in C. If I can understand it better, I can port it to PBP
i have been doing the same thing but pbp is going nowhere .i think its time to go the other way i.e
converting to C from pbp ,If I can understand it pbp then its easy in C. i have been hanging on so as
to be able to support my older products but really!.
conversion is not too onerous and once i get it going in C i can refine away using the obvious advantages
available . its taken a while to come to terms with the microchip code configurator but if you are
working with chips with pps then its well worth the effort.
after ioannis got me interested in apa10c rgb leds i discovered i had 17 more of them and thought why not
make a animated "star" to christen the top of the christmass tree.
the idea seemed pretty straight forward a good simple project, but it soon got tedious trying to manipulate
24bit vars in pbp. data transmission was slow and getting it to function in an isr was problematic
so i gave up and went asm, which generated another set of issues when the code needs to port between
pic16/18 devices.
in C with its abundant variable types combined with structures and unions its just so simple no mental
gymnastics required and once functional in C its just a simple task using the code configurator [MCC] to
port it to other chips.
interestingly a led dataframe [ 24bit start, 17 x 32bit data ,24bit stop ] sent in isr
time asm pic18f26k22@64m 410uS, C pic18f26k22@64m 608uS, C pic16f18326@32m 667uS.
turns out C is not too bad at banging out bytes from complex arrays ,even if its not optimised .isr's are way easier to implement.
this really meant that asm was no longer even a consideration for this application.
here's the pbp version and the first draft of the C conversion done with a 18f26k22 , although the finished
project went on a 16f18326.
Bookmarks