??? 01/04/05 07:00 Read: times Msg Score: +1 +1 Good Answer/Helpful |
#84297 - 40Khz for 10 cycles Responding to: ???'s previous message |
Rob, there's a number of ways of achieving what you want. The most obvious is to 1/turn the output on 2/delay for 1/2 cycle time 3/turn the output off 4/delay for 1/2 cycle time 5/ repeat 10 times If this is done in assembler you will have to count your cycles carefully. Mind you, getting 40KHz PRECISELY is probably not required. The resonant frequency of most of the ultrasonic transducers changes with temperature,so I would think 40KHz +/- 100Hz is probably all that is required. The other methods is to use the timers or, if your device has it, the PCA. The main thing to watch out for is when using interrupts that the ISR doesn't get in the way of your 40KHz timing. So where possible - try not to use interrupts for other devices whilst you are sending the 40KHz. |
Topic | Author | Date |
how can i do a40kHz signal for 10 cycles | 01/01/70 00:00 | |
whole numbers | 01/01/70 00:00 | |
baud rates | 01/01/70 00:00 | |
CAN baud rate | 01/01/70 00:00 | |
Tutorials and the Bible | 01/01/70 00:00 | |
reply | 01/01/70 00:00 | |
Thanks for the advice | 01/01/70 00:00 | |
Actually... | 01/01/70 00:00 | |
And what about 2x Xtal? | 01/01/70 00:00 | |
40Khz for 10 cycles | 01/01/70 00:00 | |
Run the numbers | 01/01/70 00:00 | |
or![]() | 01/01/70 00:00 | |
Don't forget | 01/01/70 00:00 | |
Resonance | 01/01/70 00:00 | |
12MHz would not work, either | 01/01/70 00:00 | |
22.118MHz for signal and CAN | 01/01/70 00:00 | |
CAN CAN | 01/01/70 00:00 | |
CAN and 'CC02 | 01/01/70 00:00 | |
some correction | 01/01/70 00:00 | |
Get 40,000 kHz T2 auto reload 12 mHz | 01/01/70 00:00 | |
sounds like an application for a PCA | 01/01/70 00:00 | |
... and this IS an RD2 | 01/01/70 00:00 |