Search found 2 matches

by fairbrain
Sun Sep 27, 2015 11:15 pm
Forum: C and ASM Programming
Topic: Timer0 accuracy setting using c code
Replies: 2
Views: 20421

Re: Timer0 accuracy setting using c code

Hello Medelec35 and thank you very much.

Indeed, i measure a square wave from PORT A3.
(Port A2 also gives me exactly the same period, about 540usec controlled by the Timer2.)
First enable tmr2 and then tmr0.

Normally with INT icon - no c code icon - i have set TIMER0 to call an assigned macro ...
by fairbrain
Sat Sep 26, 2015 11:40 pm
Forum: C and ASM Programming
Topic: Timer0 accuracy setting using c code
Replies: 2
Views: 20421

Timer0 accuracy setting using c code

Hello, I'm relatively inexperienced in programming and i need your help.

Project data :
1. 4MHz internal clock
2. PIC16f628A

I want to produce a square wave, with duty cycle 50%, using timer0. The square wave period is equal to 827usec and consequently the half period is approximately 413usec ...