PCD
with a GETC() call). The "ERRORS" option prevents the shutdown by detecting the
condition and resetting the UART.
Examples: #use rs232(baud=9600, xmit=PIN_A2,rcv=PIN_A3)
Example
Files:
Also See: getc(), putc(), printf(), setup_uart( ), RS2332 I/O overview
#USE RTOS
(The RTOS is only included with the PCW and PCWH packages.)
The CCS Real Time Operating System (RTOS) allows a PIC
micro controller to run regularly scheduled tasks without the need
for interrupts. This is accomplished by a function (RTOS_RUN())
that acts as a dispatcher. When a task is scheduled to run, the
dispatch function gives control of the processor to that task.
When the task is done executing or does not need the processor
anymore, control of the processor is returned to the dispatch
function which then will give control of the processor to the next
task that is scheduled to execute at the appropriate time. This
process is called cooperative multi-tasking.
Syntax:
#USE RTOS (options)
options are separated by comma and may be:
Elements:
timer=X
minor_cycle=time
statistics
Where x is 0-4 specifying the timer used by the
RTOS.
Where time is a number followed by s, ms, us, ns.
This is the longest time any task will run. Each
task's execution rate must be a multiple of this time.
The compiler can calculate this if it is not specified.
Maintain min, max, and total time used by each
task.
This directive tells the compiler which timer on the PIC to use for monitoring and
when to grant control to a task. Changes to the specified timer's prescaler will effect
the rate at which tasks are executed.
This directive can also be used to specify the longest time that a task will ever take
Purpose: to execute with the minor_cycle option. This simply forces all task execution rates to
be a multiple of the minor_cycle before the project will compile successfully. If the
this option is not specified the compiler will use a minor_cycle value that is the
smallest possible factor of the execution rates of the RTOS tasks.
If the statistics option is specified then the compiler will keep track of the minimum
132
相关PDF资料
PCI-EXP-T42G5-N1 IP CORE PCI EXPRESS ORCA 4
PCM18XH2 PROCESSOR MODULE MPLAB-ICE 2000
PCM18XN0 PROCESSOR MODULE FOR ICE2000
PDA-B-24-615-E-2B1-1-C CIRCUIT BREAKER MAG 1P 15A
PFMF.260.2 PFMF PTC FUSE SMT 2.6A 1812
PFNF.200.2 PFNF PTC FUSE SMT 2A 1206
PFRY.375 PTC-FUSE RADIAL 72 VDC
PFSM.150.33.2 FUSE PTC 8A 15V FST-TRIP SMD
相关代理商/技术参数
PCD_09 制造商:MACOM 制造商全称:Tyco Electronics 功能描述:Low Profile PCB Relay PCD
PCD-00173-0C 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY
PCD-00173-0E 制造商:Molex 功能描述:Ethernet Cable Assembly
PCD-00173-0H 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY
PCD-00173-0K 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY
PCD-00174-0C 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY; Cable Length - Imperial:3ft; Cable Length - Metric:914.4mm; Connector Type A:RJ45 Plug; Connector Type B:RJ45 Plug; Jacket Color:Red; Approval Bodies:CSA / UL; Body Material:PVC; Cable Assembly Type:Ethernet ;RoHS Compliant: NA
PCD-00174-0E 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY; Cable Length - Imperial:3ft; Cable Length - Metric:914.4mm; Connector Type A:RJ45 Plug; Connector Type B:RJ45 Plug; Jacket Color:Grey; Approval Bodies:CSA / UL; Body Material:PVC; Cable Assembly Type:Ethernet;RoHS Compliant: NA
PCD-00174-0H 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY