Jump to content
ELFORUM - Forumul electronistilor

intrebare timer


Recommended Posts

Folosesc Timer-ul 1 ca sa numar timpul intre doua impulsuri ce vin pe un pin de la Portul B (RB5). Vreau ca timpul sa poata fi mai mare de 0,013.. secunde (folosesc un cuartz de 20MHz). Cum pot face asta? Mentionez ca lucrez cu intreruperea de pe portul B. Adica vine impulsul si se declanseaza numaratoarea.Multumesc

Link to comment
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Pai poti face asa: activezi si intreruperea la Tmr1 si folosesti inca un counter software care este resetat cand resetezi timer-ul si care este incrementat de fiecare daca cand s produce depasirea la Tmr1. Counter-ul aditional poate fi pe 8, 16 ori cati biti tu ai nevoie, in functie de durata maxima care vrei sa o masori. Timpul total va fi (cand se produce intreruperea pe RB5):counter<<16+TMR1H:TMR1L[/code]

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.Terms of Use si Guidelines