I present here the software transposition that I carried out from an application published in the magazine Elektor n ° 385/386 in July 2010 page 45 . I was quickly intrigued by its author's use of a rotary encoder for the selection of iun Menu options. I tried several times to program a PIC16F628A ( in fact I have two copies ), but the software refuses to work. The software was I think originally developed in C (++) with probably a CCS compiler.
Possessing an EasyPICv7 card from mikroElektronikaas well as the license of mikroC, I undertook to transpose the original software to note again its dysfunction. I resumed the complete analysis of the software, modified a few lines of instructions, and programmed the hex file in this time a PIC16F88 because the PIC16F628A lacked RAM 1 memory , the library managing the LCD being probably more resource intensive than the one used by its developer Alexander ZIEMEK. Even by moving in ROM the "variables" which are rather constants like the text messages intended for the LCD display and which have nothing to do in RAM, this time it is the ROM memory which was missing from the PIC16F628A ( Flash : 2048 bytes) . I would have had toinstead use a PIC16F648A ( Flash: 4096 bytes) but not having one, I chose a PIC16F88 totally compatible pin to pin.
I thus succeeded in obtaining a perfectly functional system, but which certainly remains perfectible.
I also added lots of comments throughout the script, making it easier to read and understand. It goes without saying that I worked on this project as an amateur, being absolutely not a proven programmer.
The diagram presented here is very slightly modified ( correction in blue ) because I do not use the pin RW of the LCD, which remains connected to the mass. This frees the pin RA2 of the processor for another use.
I did not draw a printed circuit for this application which remains in my case an unfinished project, only the operating principle interested me.
1 PIC16F88 memory occupation during compilation:
Available RAM: 352 [bytes], Available ROM: 4096 [bytes]
Used RAM (bytes): 82 (23%) Free RAM (bytes): 270 (77%)
Used ROM (program words): 3096 (76%) Free ROM (program words): 1000 (24%)