[General]
ChipName=SN8P1917
Description=8 Bit MCU - SN8P1917

[Register]
;Item# = Index, Name, Address, Size, FormatMask, DefaultValue, ReadMask, WriteMask, CanDisplay
;if Address == NULL, means general register, none-addressable
;Address, FormatMask, DefaultValue, also can be presented by hexadecimal style, ie. 0xffff
Count=53
Item0=0, A, NULL, 8, 0xff, 0, 0xff, 0xff, 1
Item1=1, R, 0x82, 8, 0xff, 0, 0xff, 0xff, 1
Item2=2, Z, 0x83, 8, 0xff, 0, 0xff, 0xff, 1
Item3=3, Y, 0x84, 8, 0xff, 0, 0xff, 0xff, 1
Item4=4, PFLAG, 0x86, 3, 0x07, 0, 0xff, 0xff, 1
Item5=5, RBANK, 0x87, 4, 0x0f, 0, 0xff, 0xff, 1
Item6=6, LCDM1, 0x89, 6, 0x28, 1, 0xff, 0xff, 1
Item7=7, AMPM, 0x90, 4, 0x0f, 0, 0xff, 0xff, 1
Item8=8, AMPCHS, 0x91, 3, 0x07, 0, 0xff, 0xff, 1
Item9=9, AMPCKS, 0x92, 2, 0x03, 0, 0xff, 0xff, 1
Item10=10, ADCM, 0x93, 3, 0x07, 0, 0xff, 0xff, 1
Item11=11, ADCKS, 0x94, 8, 0xff, 0, 0xff, 0xff, 1
Item12=12, CPM, 0x95, 8, 0x1f, 0, 0xff, 0xf7, 1
Item13=13, CPCKS, 0x96, 2, 0x03, 0, 0xff, 0xff, 1
Item14=14, DFM, 0x97, 3, 0x05, 0x0, 0xff, 0xff, 1
Item15=15, ADCDL, 0x98, 8, 0xff, 0, 0xff, 0, 1
Item16=16, ADCDH, 0x99, 8, 0xff, 0, 0xff, 0, 1
Item17=17, LBTM, 0x9a, 3, 0x07, 0, 0x07, 0x03, 1
Item18=18, PEDGE, 0xbf, 8, 0x98, 0, 0xff, 0xff, 1
Item19=19, P1M, 0xc1, 4, 0x0f, 0, 0xff, 0xff, 1
Item20=20, P2M, 0xc2, 2, 0x03, 0, 0x03, 0x03, 1
Item21=21, INTRQ, 0xc8, 5, 0x11, 0, 0xff, 0xff, 1
Item22=22, INTEN, 0xc9, 5, 0x11, 0, 0xff, 0xff, 1
Item23=23, OSCM, 0xca, 8, 0xee, 0, 0xff, 0xff, 1
Item24=24, PCL, 0xce, 8, 0xff, 0, 0xff, 0xff, 1
Item25=25, PCH, 0xcf, 3, 0x07, 0, 0xff, 0xff, 1
Item26=26, P0, 0xd0, 1, 0x01, 0, 0xff, 0, 1
Item27=27, P1, 0xd1, 4, 0x0f, 0, 0xff, 0xff, 1
Item28=28, P2, 0xd2, 2, 0x03, 0, 0x03, 0x03, 1
Item29=29, P4, 0xd4, 3, 0x07, 0, 0xff, 0, 1
Item30=30, P5, 0xd5, 3, 0x07, 0, 0xff, 0xff, 1
Item31=31, T0M, 0xd8, 8, 0xf0, 0, 0xff, 0xff, 1
Item32=32, T0C, 0xd9, 8, 0xff, 0, 0xff, 0xff, 1
Item33=33, STKP, 0xdf, 8, 0x8f, 0x0f, 0x8f, 0x8f, 1
Item34=34, P1UR, 0xe1, 4, 0x0f, 0, 0, 0x0f, 1
Item35=35, P2UR, 0xe2, 2, 0x03, 0, 0, 0x03, 1
Item36=36, @YZ, 0xe7, 8, 0xff, 0, 0xff, 0xff, 1
Item37=37, STK7L, 0xf0, 8, 0xff, 0, 0xff, 0xff, 1
Item38=38, STK7H, 0xf1, 3, 0x07, 0, 0xff, 0xff, 1
Item39=39, STK6L, 0xf2, 8, 0xff, 0, 0xff, 0xff, 1
Item40=40, STK6H, 0xf3, 3, 0x07, 0, 0xff, 0xff, 1
Item41=41, STK5L, 0xf4, 8, 0xff, 0, 0xff, 0xff, 1
Item42=42, STK5H, 0xf5, 3, 0x07, 0, 0xff, 0xff, 1
Item43=43, STK4L, 0xf6, 8, 0xff, 0, 0xff, 0xff, 1
Item44=44, STK4H, 0xf7, 3, 0x07, 0, 0xff, 0xff, 1 
Item45=45, STK3L, 0xf8, 8, 0xff, 0, 0xff, 0xff, 1
Item46=46, STK3H, 0xf9, 3, 0x07, 0, 0xff, 0xff, 1
Item47=47, STK2L, 0xfa, 8, 0xff, 0, 0xff, 0xff, 1
Item48=48, STK2H, 0xfb, 3, 0x07, 0, 0xff, 0xff, 1
Item49=49, STK1L, 0xfc, 8, 0xff, 0, 0xff, 0xff, 1
Item50=50, STK1H, 0xfd, 3, 0x07, 0, 0xff, 0xff, 1
Item51=51, STK0L, 0xfe, 8, 0xff, 0, 0xff, 0xff, 1
Item52=52, STK0H, 0xff, 3, 0x07, 0, 0xff, 0xff, 1

[RegisterBit]
;RegName = LowIndex[:HighIndex], Name [,LowIndex[:HighIndex], Name]
R=0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7
Z=0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7
Y=0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7
PFLAG=0, Z, 1, DC, 2, C
RBANK=0, RBNKS0, 1, RBNKS1, 2, RBNKS2, 3, RBNKS3 
LCDM1=3, LCDENB, 5, LCDBNK
AMPM=0, AMPENB, 1, GS0, 2, GS1, 3, GS2
AMPCHS=0, CHS0, 1, CHS1, 2, CHS2
AMPCKS=0, AMPCKS0, 1, AMPCKS1
ADCM=0, ADCENB, 1, RVS0, 2, RVS1
ADCKS=0, ADCKS0, 1, ADCKS1, 2, ADCKS2, 3, ADCKS3, 4, ADCKS4, 5, ADCKS5, 6, ADCKS6, 7, ADCKS7 
CPM=0, FCPRENB,1,FCPON,2,FCPAUTO,3,FCPSTS,4,FAVENB,5,FAVESEL,6,FAVDDRENB,7,FACMENB
LBTM=0, LBTENB, 1, P41IO, 2, LBTOB
CPCKS=0, CPCKS0, 1, CPCKS1
DFM=0, DRDY, 2, WRS0
ADCDL=0, ADCB0, 1, ADCB1, 2, ADCB2, 3, ADCB3, 4, ADCB4, 5, ADCB5, 6, ADCB6, 7, ADCB7
ADCDH=0, ADCB8, 1, ADCB9, 2, ADCB10, 3, ADCB11, 4, ADCB12, 5, ADCB13, 6, ADCB14, 7, ADCB15
PEDGE=3, P00G0, 4, P00G1, 7, PEDGEN
P1M=0, P10M, 1, P11M, 2, P12M, 3, P13M
INTRQ=0, P00IRQ, 4, T0IRQ
INTEN=0, P00IEN, 4, T0IEN
OSCM=1, STPHX, 2, CLKMD, 3, CPUM0, 5, WDARTE, 6, WDRST, 7, WTCKS
PCL=0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7
PCH=0, 8, 1, 9, 2, 10
P0=0, P00
P1=0, P10, 1, P11, 2, P12, 3, P13
P2=0, P20, 1, P21
P4=0, P40, 1, P41, 2, P42
P5=0, P50, 1, P51, 2, P52
T0M=4, T0RATE0, 5, T0RATE1, 6, T0RATE2, 7, T0ENB
T0C=0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7
STKP=0, STKPB0, 1, STKPB1, 2, STKPB2, 3, STKPB3, 7, GIE
P1UR=0, P10R, 1, P11R, 2, P12R, 3, P13R
P2UR=0, P20R, 1, P21R
@YZ=0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7
STK7L=0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7
STK7H=0, 8, 1, 9, 2, 10
STK6L=0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7
STK6H=0, 8, 1, 9, 2, 10
STK5L=0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7
STK5H=0, 8, 1, 9, 2, 10
STK4L=0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7
STK4H=0, 8, 1, 9, 2, 10
STK3L=0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7
STK3H=0, 8, 1, 9, 2, 10
STK2L=0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7
STK2H=0, 8, 1, 9, 2, 10
STK1L=0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7
STK1H=0, 8, 1, 9, 2, 10
STK0L=0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7
STK0H=0, 8, 1, 9, 2, 10

[Rom]
;Measurement = size
Measurement=16
;EntireSize = size, can use 'k', 'K', 'm', 'M', 'g', 'G' to represent measurement
EntireSize=2K

ForbiddenCount=0
;Forbidden = start address, end address
Forbidden0=0, 0

;Banked = 0/1 means false/true
Banked=1
BankStartAddr=0
;BankSize = size, can use 'k', 'K', 'm', 'M', 'g', 'G' to represent measurement
BankSize=16K

[Ram]
;Measurement = size
Measurement=8
;EntireSize = size, can use 'k', 'K', 'm', 'M', 'g', 'G' to represent measurement
EntireSize=3852

ForbiddenCount=1
;Forbidden# = start address, end address
Forbidden0=0x100, 0xeff

;Banked = 0/1 means false/true
Banked=1
BankStartAddr=0
;BankSize = size, can use 'k', 'K', 'm', 'M', 'g', 'G' to represent measurement
BankSize=256

[PC]
;Name=PC
;if Address == NULL, means none-addressable
Address=0xce
Size=11

[Stack]
;Name=STKP
;if Address == NULL, means none-addressable
Address=0xdf
;if size == 0, means no limitation
Size=8
IsIncrease=1

[I/O Port]
;Item# = Name, Size, Bit Mask, Input Bit Mask, Output Bit Mask
Count=5
Item0=P0, 1, 0x01, 0x01, 0
Item1=P1, 4, 0x0f, 0x0f, 0x0f
Item2=P2, 2, 0x03, 0x03, 0x3
Item3=P4, 3, 0x07, 0x07, 0
Item4=P5, 3, 0x07, 0x07, 0x07

[Timer]
Count=2
Item0=WDT
Item1=T0

[Interrupt]
;Item# = Source Name, Priority, ISR Entry
Count=2
Item0=T0, 1, 0x08
Item1=INT0, 1, 0x08


[LCDInformation]
;LCD information in the section
RamSize=12
StartAddr=0xf00
COMNum=4
SEGNum=12
;number of COM per byte
COMNumPerByte=4
