what happen if you send 101?
what happen if you send 101?
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
If i send 101 in theory nothing should happen. 100 should mean its the brightest. 0 is obv off. 255 means data start and 254 means reset the address.
That program isnt quite finished. The idea is that each chip picks up 16 bytes of data. 1 chip handles the first 8 and the other handles the second lot of 8. Resetting the address should only happen if a button is being held down when the command goes out.
Ive got the lights running a test pattern now so ill see if they break
I dont see:
@ DEVICE PIC16F???,XT_OSC
@ DEVICE PIC16F???,HS_OSC
etc,ect.
in your code
maybe i've misunderstood something but
Code:if recpos=18 then if indata<100 then address=indata write 0, address for y=1 to 10 high portb.6 high portb.7 pause 20 low portb.6 low portb.7 pause 20 next high portb.6 else low portb.6 for y=1 to 10 high portb.7 pause 20 low portb.7 pause 20 next high portb.6 endif recpos=16
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
All fuses are set in the programmer software. I did have problems with them but now ive set them correctly it works.
That section of code your looking at is to reset the address. It only runs if RecPos=18. RecPos is only set to 18 if chr(254) arrives. That check is so the address must be less than 100. Well, i dont think ill be making 100 boxes that each have 16 chanels. 1600 sets of lightsa nice thought but a little out of my price range. Hehe
Edit: Those loops just make the lights flash either orange or red depending if the address was ok or not ok
Bookmarks