Quote:
Originally Posted by Freyguy
Hi Harlequin2,
It looks like DJ’s link is still active back on post 386. Don’t think the C conversion was ever finished.
Looking at what would be applicable within my code, I’d say driving the LCD, UART and reading/writing to EEPROM. I wonder if it would be easier to use available CCS C libraries for the PIC?
Example HD44780 16x2 LCD code (4-bit mode with R/W tied low) was found here-
CCS :: View topic - Flexible LCD driver
|
If he didn't finish it, then I'll treat it with some reserve, but worth a look to see what he did do.
I already use quite a few CCS library functions although I modified the LCD driver along the lines of the link you gave so's I could use pins to suit my pcb layout. Also, the UART routines. Haven't used eeprom in what I have done so far, but yes, you are right in looking at those for your Cougar LCD board. I guess you followed the link I sent you for the CCS compiler! It has lots of good stuff and easy to use too, although a bit ROM hungry. I find that if you strip out a lot of their "general" stuff and trim it to fit the micro you are using, you can shrink it down quite a bit.
I originally used the printf function to write to the LCD but found it consumed ROM at a tremendous rate, so I wrote my own routines for formatting and writing my own data which allowed me to fit my control unit into the 3.5k in the 16F1826. But now I have discovered the 16F1827 which is the same but with 7k rom and 385 bytes of RAM, so I am tempted to do some function creeping!
But time to look at your stuff now and see if I can get my functions into it while preserving most of what you did. The CAN bus can all go and some of the alarm outputs and that'll give me enough pins for a s/w uart to talk to my bms modules.
The bms is fitted to my car now and doing its thing quite nicely, but its a nuisance having a separate control unit.
Oh wow, I just looked at that link, what a lot of stuff. Modifying it for CCS alone is a lot of work! I wonder how efficiently it compiles compared with the size of your ASM stuff? This is not something I am going to rush into.