17.02.2015 Views

CCS C Compiler Manual PCB / PCM / PCH

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Examples:<br />

Example Files:<br />

Also See:<br />

output_drive(pin_A0); // sets pin_A0 to output its value<br />

output_bit(pin_B0, input(pin_A0)) // makes B0 the same as A0<br />

None<br />

input(), output_low(), output_high(), output_bit(), output_x(), output_float()<br />

.<br />

output_float( )<br />

Syntax:<br />

Parameters:<br />

Returns:<br />

Function:<br />

Availability:<br />

Requires:<br />

output_float (pin)<br />

Pins are defined in the devices .h file. The actual value is a bit address. For<br />

example, port a (byte 5 ) bit 3 would have a value of 5*8+3 or 43 . This is<br />

defined as follows: #DEFINE PIN_A3 43 . The PIN could also be a variable to<br />

identify the pin. The variable must have a value equal to one of the constants<br />

(like PIN_A1) to work properly. Note that doing I/O with a variable instead of a<br />

constant will take much longer time.<br />

undefined<br />

Sets the specified pin to the input mode. This will allow the pin to float high to<br />

represent a high on an open collector type of connection.<br />

All devices.<br />

Pin constants are defined in the devices .h file<br />

Examples:<br />

if( (data & 0x80)==0 )<br />

output_low(pin_A0);<br />

else<br />

output_float(pin_A0);<br />

Example Files:<br />

Also See:<br />

None<br />

input(), output_low(), output_high(), output_bit(), output_x(), output_drive(),<br />

#USE FIXED_IO, #USE FAST_IO, #USE STANDARD_IO, General Purpose<br />

I/O<br />

output_high( )<br />

Syntax:<br />

output_high (pin)<br />

228

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!