Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Frequency generation using bascom

Status
Not open for further replies.

zohaib

Member level 4
Joined
Aug 24, 2007
Messages
75
Helped
2
Reputation
4
Reaction score
1
Trophy points
1,288
Location
PAKISTAN
Activity points
1,729
bascom timer

hello everyone!
can i generate a reliable frequency using waitus command in bascom avr?
thanx.

Added after 4 hours 49 minutes:

please answer me!
thanks
 

bascom pulseout


hi
I dont expect bascom to make an accurate frequency as the basic commands time is unknown( the assembly only can be calculated), also it may differ greatly if the crystal is not right configured,that's the command
$crystal=4000000 ( as an example)
 

    zohaib

    Points: 2
    Helpful Answer Positive Rating
pulse bascom

thanx medra
timer operation in bascom is also a bit difficult can you direct me to a link for its help
thanx again
 

bascom and generate pulse and timer


hi
the timers can be used as timers , counters or pwm
the prescale is the factor that divide the crystal to slow down the timer
capture edge is ude with counters ( falling or rising)
timer 0 is 8 bits , the 2 other are 16bit

go to bascom help for example programs
 

    zohaib

    Points: 2
    Helpful Answer Positive Rating
bascom timer

see bascom help for "PULSE" command

Generates a pulse on a pin of a PORT of specified period in 1uS units for 4 MHz.

Syntax
PULSEOUT PORT , PIN , PERIOD


Remarks

PORT Name of the PORT. PORTB for example
PIN Variable or constant with the pin number (0-7).
PERIOD Number of periods the pulse will last. The periods are in uS when an XTAL of 4 MHz is used.
The pulse is generated by toggling the pin twice, thus the initial state of the pin determines the polarity.
The PIN must be configured as an output pin before this statement can be used.


also look at the "SOUND" command
 

    zohaib

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top