Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
LED macro x,y ; MACRO LED <PORTA>, <TRISA>
clrf LATA ; Clear LATA
movlw y
movwf TRISA ; TRISA = y
movlw x
movwf LATA
endm ; end macro
START
LED3 LED b'01000000', b'00111111'
LED5 LED b'10000000', b'01111110'
goto START
Hey UTMonkey. One thing you may run into (I did when trying something with it) with that interrupt code of mine is that if you want to blink the LEDs very fast you'll get odd results as the speed of blinking starts to get too close to the interrupt display updates. Odd harmonics happen and LEDs blink for too short a period or don't light at all because they were on and off before their update came.UTMonkey said:I am definitely NOT going to light the LED's this way. I will use Interrupts as suggested by FUTZ and Bill.