Positron Compiler Documentation

Positron16 Compiler Overview

Positron16 · Revision 1.1.3.5 · PDF pages 18–19

Positron16 Compiler Overview

Original diagram or table from Positron16, PDF page 18
Original figure / layout · PDF page 18
Text in this figure or table

Positron16 Compiler

View original PDF page 18Open page in PDFOriginal PDF page 18

This manual is not intended to give details about individual microcontroller devices, therefore, for further information visit the Microchip™ website at www.microchip.com, and download the multitude of datasheets and application notes available.

Most PIC24® and dsPIC33® devices have analogue comparators and ADCs etc. When these devices first power up, the pin is set to analogue mode, which makes the pin functions work in a strange manner. To change the pins to digital, the appropriate SFRs (Special Function Registers) must be manipulated near the front of your BASIC program, or before any of the pins are accessed. The SFRs in question do have a commonality between devices, however, there are sometimes subtle differences, therefore, always read the datasheet for the device being used.

The compiler attempts to make all pins digital by manipulating the required SFRs before the user’s program starts. This is accomplished within each device’s “.def” file. However, this is not foolproof and some peripherals may slip through. Users are requested to inform the forum if any extra SFRs are required for a particular device, and these will be added in a later update of the compiler.

All of the microcontroller’s pins are set to inputs on power-up. Once again, always read the datasheets to become familiar with the particular device being used.

Devices containing PPS (Peripheral Pin Sharing) have the ability to choose the pins used by certain peripherals. There are dedicated SFRs for PPS that must be manipulated correctly otherwise the peripheral in question will not work. See the ports section of this manual

View original PDF page 19Open page in PDFOriginal PDF page 19

Topics