Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 1st September 2004, 01:22 PM   (permalink)
Default Using the Timer0 module

How can I use Timer0 to create a pulse for controlling a dc motor? I try to use it with PIC 16F628A . One motor uses PWM, another uses Timer0.
But I don't know when we init Timer0, it will increase every intructions cycles, right ? so, what we would do in main , meanwhile Timer0 is increasing ?

The Duty cycle of the pulse is create by set the pin high (1) , then init timer0, ( after it overflows), PC comes to Interrupt routine. Do the Int , then go back to main program, and in program what would we write? ( It must be enough intructions for Timer0 to timing , right ? )

thank you very much for answer my question.
wonbinbk is offline  
Old 10th September 2004, 02:46 PM   (permalink)
Default

That is very confusing ! You could try to explain better, but the Timer functions aren't maded specially to create Pulses, as i said try to explain your situation better.
bye.
TiagoSilva is offline  
Old 14th September 2004, 07:06 AM   (permalink)
Default

Sorry everybody and thank TiagoSilva very much.
My english is bad and you didn't understand me.
But my question is not important now .
I have already understand how to use timer0 module.

Yeah, TiagoSilva is right but I use timer0 to create a pulse.
I set pin RA0 =1 , then I allow time0 to run, and when it overflows , PC come to Interrupt . In Interrupt code , I then change this pin to 0,.. and etc...

thank you, TiagoSilva !
wonbinbk is offline  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 03:47 PM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker