Since you are driving LEDs, why not MIBAM ?
Since you are driving LEDs, why not MIBAM ?
"If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte
Hi Mark, Apologies...I missed your earlier contribution...that looks like something along the lines of what I need...I'll give it a try over the weekend - many thanks!
You probably realize this... but you will need a pause, of some time delay, after each "GOSUB LED_OUT", in Mark's example. In order for your eye to see the LED's ON or OFF or they may just appear to be flickering at half brighteness.
Also the "X's" in the example will not compile... need to use "0's". At least they don't compile using microcodestudio.
good luck!!Code:LED VAR WORD Main: LED = %0000000111111111 'ALL LEDS ON GOSUB LED_OUT PAUSE 500 'or delay of your choosing LED = %0000000000000000 'ALL LEDS OFF GOSUB LED_OUT PAUSE 1000 'or delay of your choosing Goto Main LED_OUT: PORTC.6 = LED.0 PORTB.6 = LED.1 PORTB.5 = LED.2 PORTB.4 = LED.3 PORTC.2 = LED.4 PORTC.1 = LED.5 PORTC.0 = LED.6 PORTA.2 = LED.7 PORTA.1 = LED.8 RETURN
Last edited by Heckler; - 3rd September 2011 at 00:31.
Dwight
These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.
Heckler, you are right on all accounts.
In the digital world "X" means "don't care". A 1 or 0 will not cause a state change.
Sorry for the confusion. In PBP you can drop the leading zeros in a binary variable.
This %000000111111111 would equal %111111111.
Best regards
Bookmarks