14.11.2012 Views

Guide to adding PIC micro-controllers to Flowcode - Matrix ...

Guide to adding PIC micro-controllers to Flowcode - Matrix ...

Guide to adding PIC micro-controllers to Flowcode - Matrix ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

3. Example FCD conversion 16F84 <strong>to</strong> a 16C711<br />

Creating a FCD file for a <strong>PIC</strong>16C711.<br />

The <strong>PIC</strong>16C711 is very similar <strong>to</strong> the <strong>PIC</strong>16F84. The only major differences being that the 16C711 has<br />

four analogue input pins and a larger EEPROM memory.<br />

So <strong>to</strong> begin we can take a copy of the 16F84.FCD and rename it 16C711.FCD.<br />

Remember that all of the information you require is contained in the <strong>PIC</strong><strong>micro</strong> datasheet. It may take a<br />

while <strong>to</strong> track down exactly what you are looking for but everything you require will be there.<br />

Below is a copy of the 16F84 FCD file with items that need removing highlighted in red. The 16C711<br />

modifications are highlighted in green.<br />

[Device]<br />

Pins=18<br />

Ports=2<br />

ADCPins=0 ADCPins=4<br />

ADCBits=0ADCBits=8<br />

MaxClock=10000000MaxClock=10000000<br />

PrescalerBits=3<br />

ClockDivider=4<br />

TimerOverflow=256<br />

ConfigAddress=0x2007<br />

ConfigCount=1<br />

PWMCount=0<br />

EepromSize=64EepromSize=1024<br />

HasAltPWM=0<br />

Pwm2IsD4=0<br />

ChipName=16C711<br />

[Pins]<br />

Pin1="RA2"Pin1="RA2/AN2"<br />

Pin2="RA3"Pin2="RA3/AN3/Vref"<br />

Pin3="RA4/T0CKI"<br />

Pin4="MCLR"<br />

Pin5="Vss"<br />

Pin6="RB0/INT"<br />

Pin7="RB1"<br />

Pin8="RB2"<br />

Pin9="RB3"<br />

Pin10="RB4"<br />

Pin11="RB5"<br />

Pin12="RB6"<br />

Pin13="RB7"<br />

Pin14="Vdd"<br />

Pin15="OSC2/CLKOUT"<br />

Pin16="OSC1/CLKIN"<br />

Pin17="RA0"Pin17="RA0/AN0"<br />

Pin18="RA1"Pin18="RA1/AN1"<br />

[Ports]<br />

PortPin1=0x0002<br />

PortPin2=0x0003<br />

PortPin3=0x0004<br />

PortPin6=0x0100<br />

PortPin7=0x0101<br />

PortPin8=0x0102<br />

PortPin9=0x0103<br />

PortPin10=0x0104<br />

PortPin11=0x0105<br />

PortPin12=0x0106<br />

PortPin13=0x0107<br />

PortPin17=0x0000<br />

PortPin18=0x0001<br />

[PortMasks]<br />

PortMask0=0x1F<br />

PortMask1=0xFF

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

Saved successfully!

Ooh no, something went wrong!