??? 05/17/07 13:39 Read: times |
#139436 - It's WORKING!! Responding to: ???'s previous message |
Hi to everyone.
I didn't expect soo much answers. WOW, this forum rules!! =D Yesterday's night I wrote the code to a AT89S8252 and it's working!!! these are the main specs of the program. - timer0 counter/timer to count the 1-to-0 transition, working in 16 bits - an extra byte in the RAM for the third byte of the "timer0 counter" (30h) - interrupt of the timer0 overflow to increase the third byte. The code of the interrupt is REALLY SMALL. only inc 30h and RETI. That would not be a problem if the interrupt occurs when the program-delay is in progress. - timer1 timer for RS232 interface Once the delay of 1sec has finished, I stop the timer0 and disable the timer0 interrupt. I have in 30h - TH0 - TL0 three bytes long number of the frequency. At this time, I can do whatever I want with the program and the frequency value will not be modified by the time I take to do whatever I want to do in my program. So, I have a small program that converts 3 bytes HEXA to 4 byes BCD (8 digits). Then, I split each BCD, add 30h to each one and.. it's done, I have the value in ASCII. Yesterday I've sent this ASCII to the serial port (plus a 0d0a for enter) and I've measured 120khz (the max value of my home-made oscillator). I will make a oscillator with 2 NOT schmitt trigger gates and test with upper frequencies. The next step is to show the ASCII in my 2x16 LCD display. thanks a lot for your help!!! |
Topic | Author | Date |
8051 frequency meter. Interrupt question | 01/01/70 00:00 | |
Formatted Code | 01/01/70 00:00 | |
Thanks Jon | 01/01/70 00:00 | |
No Problem - What about EA | 01/01/70 00:00 | |
EA | 01/01/70 00:00 | |
corrected code | 01/01/70 00:00 | |
that is a pipe dream | 01/01/70 00:00 | |
External hardware | 01/01/70 00:00 | |
Why no more than 100K? | 01/01/70 00:00 | |
the obvious way to do this is to use one timer as | 01/01/70 00:00 | |
there is a 3rd byte | 01/01/70 00:00 | |
no good | 01/01/70 00:00 | |
assuming you can do the math... | 01/01/70 00:00 | |
HUH | 01/01/70 00:00 | |
And what? | 01/01/70 00:00 | |
... and ... | 01/01/70 00:00 | |
Eh? | 01/01/70 00:00 | |
the counter is not 'a counter' | 01/01/70 00:00 | |
you should be on the safe side... | 01/01/70 00:00 | |
who cares who 'wins' | 01/01/70 00:00 | |
Continuation... | 01/01/70 00:00 | |
now let\'s cheat | 01/01/70 00:00 | |
Get something working first | 01/01/70 00:00 | |
I diasagree | 01/01/70 00:00 | |
It's WORKING!!![]() | 01/01/70 00:00 |