You are here

Error In pull-up mode | Cypress Semiconductor

Error In pull-up mode

Summary: 1 Reply, Latest post by btk on 09 Jun 2010 06:54 PM PDT
Verified Answers: 0
Last post
Log in to post new comments.
ritindeepsingh's picture
4 posts

hi friends, i was making a simple keycheck program, i selected the pins(p1.0, p1.2, p1.4, p1.6), where i connect push-buttonsand made them in pull-up mode so that on pressing the key, ground makes the pins active.

But on selecting all these 4 pins to pull-up mode, i realised that only p1.0 was initally pulled up but no other pin was pulled up , though i selected all the 4 pins to be in  pull-up mode.

I need help, as i need 4  buttons to run my project, so whats the probllem with this, or is there any other solution to it.


my program:



mov REG[PRT1DR], 255


TST REG[PRT1DR], %00000001

jnz nextkey

call tx_front



TST REG[PRT1DR], %00000100

jnz nextkey1

call tx_back



TST REG[PRT1DR], %00010000

jnz nextkey2

call tx_left



TST REG[PRT1DR], %01000000

jnz keypad

call tx_right


jmp keypad

btk's picture
Cypress Employee
3 posts


I don't see anything that immediately looks wrong with this code.

What does the code in your "tx" functions look like?

Are you doing any ANDs or ORs with the PRT1DR register anywhere else. If you are, this can cause the pull up drive mode to get disabled on other PRT1DR bits.


Log in to post new comments.