Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
No... The 22 has two serial ports .. It just happens to be a 5v device...MrDeb said:Thinking just use the 18f13k22 since, as I understand it, the 22 means it is 3v -5v device.
Device = 18F43k22
Clock = 8
Config MCLRE = off //COMPILE ERROR??
// some LCD options...
'#option KEYPAD_PORT = PORTc
#option LCD_DATA = PORTD.4
#option LCD_RS = PORTD.0
#option LCD_EN = PORTD.1
// import LCD library...
Include "SetDigitalIO.bas"
'Include "IntOSC8.bas"
Include "LCD.bas"
Include "utils.bas"
'INCLUDE "Keypad16pullup.bas"
Include "Convert.bas"
// include ISR timer module
Include "ISRTimer.bas"
Dim mS As Word
Dim blue As PORTB.7
Dim button As PORTB.4
Dim green As PORTB.5
Dim red As PORTB.6
Dim s As String
Thanks tumbleweed... I hadn't a swordfish manual handy... ( I don't think MrDeb has either )On the 18F43K22, the choices for MCLRE are INTMCLR, EXTMCLR
config MCLRE = INTMCLR
You keep confusing me... there is no K series of this type... The pic18f4321 has no direct descendant... Mentally added... At least I can now follow.note using same perfboard as with the 18f43k21 so hardware has not changed.
Config 'for K-series device
FOSC = HSHP ,'HS oscillator (high power > 16 MHz)
PLLCFG = Off ,'Oscillator used directly
PRICLKEN = Off ,'Primary clock can be disabled by software
FCMEN = Off ,'Fail-Safe Clock Monitor disabled
IESO = Off ,'Oscillator Switchover mode disabled
'PWRTEN = Off ,'Power up timer disabled
PWRTEN = on ,'Power up timer enabled
BOREN = Off ,'Brown-out Reset disabled in hardware and software
'BOREN = on ,'Brown-out Reset enabled
BORV = 285 ,'VBOR set to 2.85 V nominal
WDTEN = Off ,'Watch dog timer is always disabled. SWDTEN has no effect.
WDTPS = 256 ,'1:256
PBADEN = Off ,'PORTB<5:0> pins are configured as digital I/O on Reset
HFOFST = Off ,'HFINTOSC output and ready status are delayed by the oscillator stable status
MCLRE = EXTMCLR ,'MCLR pin enabled, RE3 input pin disabled
'MCLRE = INTMCLR, 'MCLR pin disabled, RE3 input pin enabled
STVREN = On ,'Stack full/underflow will cause Reset
'LVP = On ,'Single-Supply ICSP enabled if MCLRE is also 1
LVP = Off ,'Single-Supply ICSP disabled
XINST = Off ,'Instruction set extension and Indexed Addressing mode disabled (Legacy mode)
Debug = Off'Disabled
device = 18F43K22
clock = 8
// uncomment the following line if you do NOT have a pullup on the MCLR pin
'config MCLRE = INTMCLR
include "intosc.bas"
include "setdigitalio.bas"
// LED pin
dim LED as PORTC.3
setalldigital()
output(LED)
while (true)
LED = 1
delayms(500)
LED = 0
delayms(500)
end while