I would like to continue from this thread onwards.
Link to other thread to avoid confusion
One, Two and Three
I am attaching the Schema for reference.
Aim: The PIC monitors the PSU, Charger Voltage, Charging current and Float charging mode. Senses AC failure and PSU + charger fault conditions.
Displays everything in a 16x2 LCD in 4 bit mode. Audible alarm is also there just to annoy me if I forgot to check since this charger is mounted a bit high.
Continued from this thread.
@JohnInTX
The Buzzer is at RC6. RC2 is Enable pin of LCD.
I will swap them if you want me to.
The Problem I had was that the LCD is getting jumbled as I add more messages.
I figured it was due to all blocking codes of the buzzer and LCD like you said.
As of now the beeper is working. From the scope images you can see.
The Project is about the SLA charger I built.
I can do the ADC reading and displaying stuff. I have done that before. Crude but works. It gets messed up with too many messages. I cannot figure out why and nobody here had an answer before.
Since you are here I knew you will have an answer and so I thought why not start it.
The aim of the code is to monitor the charger.
Measure voltages from 5 different ADC inputs. Display them and act on it accordingly. Nothing more. It drives the Charging circuit, ON, OFF and alarm stuff with 16x2 4 bit LCD display.
All I need for now it to display Messages in LCD using interrupt. It must be possible but I cannot get my head around that part.
Can we use TMR0 for LCD messages and leave TMR2 for buzzer as it is ?
PS. Originally the target was '876 but that did not have an int osc. So switched to '886. It was PIN compatible
Link to other thread to avoid confusion
One, Two and Three
I am attaching the Schema for reference.
Aim: The PIC monitors the PSU, Charger Voltage, Charging current and Float charging mode. Senses AC failure and PSU + charger fault conditions.
Displays everything in a 16x2 LCD in 4 bit mode. Audible alarm is also there just to annoy me if I forgot to check since this charger is mounted a bit high.
Continued from this thread.
@JohnInTX
The Buzzer is at RC6. RC2 is Enable pin of LCD.
I will swap them if you want me to.
The Problem I had was that the LCD is getting jumbled as I add more messages.
I figured it was due to all blocking codes of the buzzer and LCD like you said.
As of now the beeper is working. From the scope images you can see.
The Project is about the SLA charger I built.
I can do the ADC reading and displaying stuff. I have done that before. Crude but works. It gets messed up with too many messages. I cannot figure out why and nobody here had an answer before.
Since you are here I knew you will have an answer and so I thought why not start it.
The aim of the code is to monitor the charger.
Measure voltages from 5 different ADC inputs. Display them and act on it accordingly. Nothing more. It drives the Charging circuit, ON, OFF and alarm stuff with 16x2 4 bit LCD display.
All I need for now it to display Messages in LCD using interrupt. It must be possible but I cannot get my head around that part.
Can we use TMR0 for LCD messages and leave TMR2 for buzzer as it is ?
PS. Originally the target was '876 but that did not have an int osc. So switched to '886. It was PIN compatible
Attachments
-
75.1 KB Views: 13
Last edited: