Not being a very PIC learned guy (i can program a renard that's about it) but having written a LOT of C code for AVR's, they might be something worth looking at, while a step up in the processor cost, you get a product that can run C a lot faster than a PIC can. (AVR's were made with C in mind).
Just a thought.
P.Short. Is it faster to run the code without timers/interrupts? Or what was your reasoning behind not using them?
chilloutdocdoc wrote:
P.Short. Is it faster to run the code without timers/interrupts? Or what was your reasoning behind not using them?
The processor in question doesn't have interrupts, and it's one timer is next to useless. And if you were to ask why I selected such a processor, the problem didn't seem to me to call for using interrupts or a timer. I've done enough PIC assembly language programming for this type of task that it is quite easy for me to visualize and code it up.
LOL Where were you when I was hacking this project together.. Tonight I made a basic "tail" of 4 stationary LED's.. Tomorrow after work I'll try and get my "tail" moving. Like you mentioned I made the dimming with just a loop and decreasing variables to call lighting the LED's every so often and resetting the counter for that particular LED which gave me my tail.. Now to add in another variable to make it "fall/move"
Ok so it took me 2 nights to figure out how to make my tail work.. WARNING : This code is Ugly but i commented it pretty well I think and it works which is the best part.. I would like to thank P.Short for some how kicking my brain with his comments and making it all of a sudden pop in my head how it could be done or at least how I thought it could be done and obviously it can because I did it 🙂 No timers or Interrupts were harmed in the making of this Firmware.
Video In Action Uploaded 11:00pm EST will be ready in 30 minutes.
Video in the dark..
Also I've attached the Firmware for everyone to tear apart..
I don't care how ugly the code looks. The tails look awesome. Great Job!
