I am currently using LPC 2148.
I have a push button attached to port 0.15 and with every push the push button makes the pin high.
I want to count the push and with every push i want to store it into a variable and do some conversions at every push and Send the conversion data to LCD.
Can anyone guide me with the syntax, whether i should use interrupt or counter for the same?.
have u enabled the global interrupt bit? well this is something called polling where your CPU is waiting for event to occur, whereas interrupt is when CPU doesnt wait for event and does its normal work. whenever event occurs it jumps to ISR.
This is the second tutorial on LPC2148 where we are going to read the switches and turn ON/OFF the LEDs accordingly. Register Configuration The Below registers will be used for Configuring and using the GPIOs for sending and receiving the Digital signals.
This could simply be a refresh issue as the microchip tools (ex. PicKit, ICD, ... ) don't get real-time memory information, they load the memory of the pic when code execution pauses. tellthebell Your post does not mention anything to rule out this issue. To see a change in the variable, you will have to occasionally pause execution so that the IDE has a chance to reload the PIC's memory and refresh the value.
HI...i am also facing the issue. How could I set this global bit?Which is the one?Do you have an example?Note that I am a begineer in microcontroller programming.Thanks ahead of time for your input.
View all questions in Classic processors forum