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 / 3432
3431  |  3433
Subject: 
Re: How i can beep the handy in Imgecraft C....
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Mon, 16 Mar 1998 19:29:36 GMT
Original-From: 
Chuck McManis <CMCMANIS@FREEGATE.COMavoidspam>
Reply-To: 
CMCMANIS@FREEGATEihatespam.COM
Viewed: 
1444 times
  
Hi German, I sent this to you before, but I guess you didn't keep
it.

This one is going to both the robot-board and handyboard lists
you can always find it again later by searching the archives for
these lists.

To beep the beeper using ImageCraft C you will need to set up
three
things,
-- Two global values, one containing the beep period, and
   the other containing the beep duration. These should be
   unsigned 16 bit values.
-- an interrupt service routine for the OC5 timer, that checks
   the duration value and if it is not zero loads the period
   value into the OC5 counter and starts it, then decrements
   the duration counter.
-- A C function that takes a frequency and period and
           converts them into a pair of period and duration
values.
   stores the global values and starts the OC5 counter for
   the first time.

If you don't set up the OC5 interrupt routine in your crt11.s
file you should store in the new values in your main() function.
Remember that the interrupt vector table on the handboard is at
0xbfe0 (check that with the pink book, i'm using it from memory
and I do drop bits now and then).

--Chuck McManis



1 Message 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