#CHIPLGT8F328P
#OPTIONEXPLICIT//!SettheportasanoutputDIRPORTBOUT//!SettheinitialvaluePORTB=1do//!Addtheexistingvalueoftheporttotheport... so, thisdoublestheportvaluePORTB=PORTB+PORTB//!Ifbit6is1thenrestartifPORTB=64thenPORTB=1//!wait...
wait100msloop
I wrote this little demo when I was sent two of these ...
- a little PCB with six LEDS. All very nice.
So, the demo below - is this the smallest program to make the six LEDs flash repeatably in sequence?
:-)
Last edit: Anobium 2022-04-26
This assembles !!!???
takes 24 words prog mem, yours takes 40 words :)
Edit it now takes 44 words ?? using gcstudio.
see image... should have saved the first compile image.
Last edit: stan cartwright 2022-04-26
Stan .. very good!
I happended to have an LGT attached..
I just uploaded to GitHub! https://github.com/GreatCowBASIC/Demonstration_Sources/tree/main/LED_Solutions/LED_flash_in_sequence
Last edit: Anobium 2022-04-26
@Anobium, your rotate method is a more ubiquitous solution for rotating 6 leds.
my code doesn't fit in with existing style.. too simple.