- Fri Feb 10, 2006 9:53 pm
#9720
Hi,
The IO0PIN register was a defined as a read only register in the header file of LPC2142. But the datasheet says it is a read and write register. I changed the header file to make the register read and write. I issued a instruction like IO0PIN_bit.P0_2 ^= 1 in a sub function, I dont see any changes in the output port. However if the same instruction is given in the main function, it works fine. What could be the problem?
The IO0PIN register was a defined as a read only register in the header file of LPC2142. But the datasheet says it is a read and write register. I changed the header file to make the register read and write. I issued a instruction like IO0PIN_bit.P0_2 ^= 1 in a sub function, I dont see any changes in the output port. However if the same instruction is given in the main function, it works fine. What could be the problem?