To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.handyboardOpen lugnet.robotics.handyboard in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / Handy Board / 8384
8383  |  8385
Subject: 
Re: generating waves
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Thu, 17 May 2001 05:45:59 GMT
Viewed: 
1751 times
  
In lugnet.robotics.handyboard, Matthias Weber writes:
I think your best bet would be to create an external oscillator that could
be controlled using one of the TOC's.  I mention the TOC's in case you need
to pulse the oscillation (infrared remote control, for example, does this.)
Anyway, look at the schematic for the Handy Board, specifically the IR
transmission specs.  There is an oscillator on the board connected to TOC2
that is tuned for 40kHz and the schematic shows you how it is done.  You
could even use the one on board by changing the resistance (R4) and/or
capacitance (C6) to tune in your frequency.
As for input captures: Ideally, the fastest capture that you could do would
have one clock cycle between events. (The event set in TCTL2, prescaler set
to 1 using TMSK2) However, there is no way your program would be able to
keep up with events at that speed, especially if you use interrupts.  So,
you'd have to think about how much time your program needs to process each
event as it occurs (whether that be saving it, or actaully calculating
something).  For example, if you're using interrupts, just switching to the
interrupt service routine takes at least 12 clock cycles.  This corresponds
to 6us on the Handy Board and the signal would have to be slower than
167kHz.  Obviously you would have to do something in the ISR and that would
lower your maximum signal frequency even more.

-Nick Schaf

Hi from Germany,

I need some help for generating a sqare wave with the Handyboard.
The frequency should be 16kHz at least. And the number of peeks must be
countable.
I only could made a 1kHz symmetrical square wave with low=high=0,5ms.
For that I tried to use TOC2 and/or TOC5 programmed in assembly language.
As the std. timer periode is 500ns to 32.77ms a 16kHz outputfreq. should be
capable (I think it). But there are problems. A frequency higher than 1kHz
causes a lot of mistakes in the square wave. Its not homogeneous any more.
What could I do?
Perhaps, an external oszilator(16kHz) with a valve driven by the HB and the
wave counted by the HB to open and close the valve?
What is the shortest time that I could detect by the Handyboard ?(using TICx
or PA (pulseaccumulator))

Please think about it and let my know about your ideas.

Bye
<Matthias>



Message is in Reply To:
  generating waves
 
Hi from Germany, I need some help for generating a sqare wave with the Handyboard. The frequency should be 16kHz at least. And the number of peeks must be countable. I only could made a 1kHz symmetrical square wave with low=high=0,5ms. For that I (...) (24 years ago, 10-May-01, to lugnet.robotics.handyboard)

2 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR