SW006013 Microchip Technology, SW006013 Datasheet - Page 201

MPLAB C Compiler For DsPIC DSCs

SW006013

Manufacturer Part Number
SW006013
Description
MPLAB C Compiler For DsPIC DSCs
Manufacturer
Microchip Technology
Series
DsPIC30F/33Fr
Type
MPLAB® C Compilerr
Datasheet

Specifications of SW006013

Supported Families
DsPIC30F, DsPIC33F
Core Architecture
DsPIC
Kit Contents
Software And Docs
Mcu Supported Families
DsPIC30F And DsPIC33F
Tool Function
Compiler
Tool Type
Compiler
Processor Series
dsPIC
Lead Free Status / RoHS Status
na
For Use With/related Products
dSPIC DSCs
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
4.5
© 2008 Microchip Technology Inc.
FUNCTIONS/CONSTANTS TO SUPPORT A SIMULATED UART
These functions and constants support UART functionality in MPLAB SIM simulator.
system (Continued)
Default Behavior:
File:
time
Description:
Include:
Prototype:
Argument:
Return Value:
Default Behavior:
File:
__attach_input_file
Description:
Include:
Prototype:
Argument:
Remarks:
Default Behavior:
File:
__close_input_file
Description:
Include:
Prototype:
Argument:
Remarks:
Default Behavior:
File:
As distributed, this function acts as a stub or placeholder for your func-
tion. If s is not NULL, an error message is written to stdout and the pro-
gram will reset; otherwise, a value of -1 is returned.
system.c
Get the system time.
<time.h>
time_t time(time_t *timer);
timer
Returns the elapse time in seconds. There is no error return.
As distributed, if timer2 is not enabled, it is enabled in 32-bit mode. The
return value is the current value of the 32-bit timer2 register. Except in
very rare cases, this return value is not the elapsed time in seconds.
time.c
Attach a hosted file to the standard input stream.
<libpic30.h>
int __attach_input_file(const char *p);
p
This function differs from the MPLAB IDE mechanism of providing an
input file because it provides "on-demand" access to the file. That is,
data will only be read from the file upon request and the asynchronous
nature of the UART is not simulated. This function may be called more
than once; any opened file will be closed. It is only appropriate to call
this function in a simulated environment.
Allows the programmer to attach a hosted file to the standard input
stream, stdin.
The function will return 0 to indicate failure. If the file cannot be opened
for whatever reason, standard in will remain connected (or be re-con-
nected) to the simulated UART.
__attach_input_file.c
Close a previously attached file.
<libpic30.h>
void __close_input_file(void);
None
None.
This function will close a previously attached file and re-attach stdin
to the simulated UART. This should occur before a reset to ensure that
the file can be re-opened.
__close_input_file.c
points to a storage location for time
pointer to file
DS51456E-page 197

Related parts for SW006013