karenhornby
New Member
Can someone please have a read through this and tell me if I've made any mistakes as I dont have a method for testing yet.
Hopefully I've written it in Picbasic Pro ( I hope)
What its supposed to do is compare inputs B1 and B4 and IF they are BOTH high then make outputs B2 and B5 high and at the same time get the LCD on line 1 to display the word VEG-OIL
IF a pushbutton switch (on Input B6) is pressed then outputs B2 goes LOW and B5 stays HIGH and the LCD displays the word FLUSHING for a period of 10 seconds then both outputs B2 AND B5 go LOW and at the same time the LCD displays the word DIESEL
When the program starts the LCD display clears the screen, waits a period of 1 second then Line 1 displays the above, while LINE 2 displays the temperature as measured by the 3rd DS1620 continually while the PIC is powered up.
I wont claim to have written this code, most of it is borrowed from other examples online from various places ,all I did was modify the bits I wanted and HOPE it works!
Can anyone tell me the easiest PIC for this to work in, or if any code or pins need changing to work with other pics?
I based it all on the 16F877 ( i think) and please bear with me, I've pnly started getting interesting in programming PIC's in the last week and uptill today knew nothing about programming.
By the way, IF this does actually appear to work could anyone compile it for me please?
Hopefully I've written it in Picbasic Pro ( I hope)
What its supposed to do is compare inputs B1 and B4 and IF they are BOTH high then make outputs B2 and B5 high and at the same time get the LCD on line 1 to display the word VEG-OIL
IF a pushbutton switch (on Input B6) is pressed then outputs B2 goes LOW and B5 stays HIGH and the LCD displays the word FLUSHING for a period of 10 seconds then both outputs B2 AND B5 go LOW and at the same time the LCD displays the word DIESEL
When the program starts the LCD display clears the screen, waits a period of 1 second then Line 1 displays the above, while LINE 2 displays the temperature as measured by the 3rd DS1620 continually while the PIC is powered up.
I wont claim to have written this code, most of it is borrowed from other examples online from various places ,all I did was modify the bits I wanted and HOPE it works!
Can anyone tell me the easiest PIC for this to work in, or if any code or pins need changing to work with other pics?
I based it all on the 16F877 ( i think) and please bear with me, I've pnly started getting interesting in programming PIC's in the last week and uptill today knew nothing about programming.
By the way, IF this does actually appear to work could anyone compile it for me please?
Attachments
Last edited: