Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

coading help required for pic16c54c.

Status
Not open for further replies.
hi;
i wana display battery charging level on a bargraph LCD using pic16c54c. Data is on four input pins of pic from circuit. normally there are simple dc inputs on all pins, but when battery is 20% charged then all inputs contains DC. when it is 40%Charged then one of the 4 pins contain 100hz frequency with 70%duty cycle. when it is 60% charged then two inputs have 100hz frequency. when it is 80% charged then 3 inputs have 100hz signal. and when it is 100% charged finally then all the pins have 100hz signal...
Now accordingly 1,2,3,4,5 bars should be displayed on the LCD , and for this just 60hz square wave is sent on LCD...
how should i code the logic in C.
1) To generate 60hz signal at the output.
2) To detect Rising or falling edge at the input.

Regards
 
Can you explain how 60Hz makes an LCD work? What kind of LCD?

Mike.

it is bar grapah LCD with no number is written on it and have 7 pins. 60 HZ means, i am sending HIGH for 7ms and LOW for 7ms. suppose i want to on 1st bar i will send 1 or 0 on com pin and than inverted level on pin 1; the bar will be on......
 
That makes no sense. How do you light one bar, two bars, many bars?

Mike.
 
I think there might be some language issues here...

Why use a 16C54? It is a very old PIC that can only be programmed once, so is expensive to work with. You must buy a ceramic windowed 16J54 (expensive!) and a UV eraser box. Then each time you program the PIC you spend 10 minutes UV erasing the device before you can program it again.

Then when your code is perfect you program it into the OTP 16C54.

A much better choice of PIC would be a 16F84 or 16F628A.
 
I think there might be some language issues here...

Why use a 16C54? It is a very old PIC that can only be programmed once, so is expensive to work with. You must buy a ceramic windowed 16J54 (expensive!) and a UV eraser box. Then each time you program the PIC you spend 10 minutes UV erasing the device before you can program it again.

Then when your code is perfect you program it into the OTP 16C54.

A much better choice of PIC would be a 16F84 or 16F628A.


acctually the circuit was already designed. i don't know why they used 16C54 .... and i think it may be the idea of business mind :B . anyhow i solved it and it displayed the bars accurately. and i also preffer to work with f series PICs. using UV Erasable PICs is also not a good idea.
 
Status
Not open for further replies.

Latest threads

Back
Top