coading help required for pic16c54c.

Status
Not open for further replies.

Qaisar Azeemi

Full Member level 5
Joined
Feb 11, 2011
Messages
315
Helped
16
Reputation
32
Reaction score
15
Trophy points
1,298
Location
Peshawar, Pakistan, Pakistan
Activity points
3,829
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
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…