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.
mov REG[PRT1DR], 255
TST REG[PRT1DR], %00000001
TST REG[PRT1DR], %00000100
TST REG[PRT1DR], %00010000
TST REG[PRT1DR], %01000000
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.