17.02.2015 Views

CCS C Compiler Manual PCB / PCM / PCH

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Common Questions & Answers<br />

If nothing is seen coming back (except the initial "Start"), check the RCV pin on the PIC®<br />

with a logic probe. You should see a HIGH state and when a key is pressed at the PC, a<br />

pulse to low. Trace back to find out where it is lost.<br />

5. The PIC® is always receiving data via RS-232 even when none is being sent.<br />

A. Check that the INVERT option in the USE RS232 is right for your level converter. If<br />

the RCV pin is HIGH when no data is being sent, you should NOT use INVERT. If the pin<br />

is low when no data is being sent, you need to use INVERT.<br />

B. Check that the pin is stable at HIGH or LOW in accordance with A above when no<br />

data is being sent.<br />

C. When using PORT A with a device that supports the SETUP_ADC_PORTS function<br />

make sure the port is set to digital inputs. This is not the default. The same is true for<br />

devices with a comparator on PORT A.<br />

6. <strong>Compiler</strong> reports INVALID BAUD RATE.<br />

A. When using a software RS232 (no built-in UART), the clock cannot be really slow<br />

when fast baud rates are used and cannot be really fast with slow baud<br />

rates. Experiment with the clock/baud rate values to find your limits.<br />

B. When using the built-in UART, the requested baud rate must be within 3% of a rate<br />

that can be achieved for no error to occur. Some parts have internal bugs with BRGH set<br />

to 1 and the compiler will not use this unless you specify BRGH1OK in the #USE RS232<br />

directive.<br />

369

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

Saved successfully!

Ooh no, something went wrong!