ВУЗ: Не указан
Категория: Не указан
Дисциплина: Не указана
Добавлен: 12.06.2025
Просмотров: 8184
Скачиваний: 1
© MCS Electronics, 1995-2007
Syntax
CLOCKDIVISON = var
Remarks
Var |
Variable or numeric constant that sets the clock division. Valid values |
are from 2-129. |
|
A value of 0 will disable the division. |
|
On the MEGA 103 and 603 the system clock frequency can be divided so you can save power for instance. A value of 0 will disable the clock divider. The divider can divide from2 to 127. So the other valid values are from 2 - 127.
Some routines that rely on the system clock will not work proper anymore when you use the divider. WAITMS for example will take twice the time when you use a value of 2.
See also
POWERSAVE
Example
$regfile = "m103def.dat" |
' specify the used |
micro |
' used crystal |
$crystal = 8000000 |
|
frequency |
' use baud rate |
$baud = 19200 |
|
$hwstack = 32 |
' default use 32 |
for the hardware stack |
' default use 10 |
$swstack = 10 |
|
for the SW stack |
' default use 40 |
$framesize = 40 |
|
for the frame space |
Config Com1 = Dummy , Synchrone = 0 , Parity = None , Stopbits = 1 , Databits = 8 , Clockpol = 0
Clockdivision = 2
CLOSE
Action
Closes an opened device.
Syntax
OPEN "device" for MODE As #channel
CLOSE #channel
Remarks
Device |
The default device is COM1 and you don't need to open a channel to use |
page -305- |