Winch
Member
I have problems with the startup of the PIC16F883!
Communication with the 16F883 gives many problems.
I use the oshonsoft software and have the code posted below. Does anyone see what the problem is?
Most likely the problem is in the "Define CONFIG" setting? But I'am not sure.
I have experience with the PIC16F873A never had a problem with it, wants to use the 883 for more analog inputs.
code (text):
'device pic16f883
Define CONFIG = 0x23e1
Define CONFIG = 0x3eff
Define CLOCK_FREQUENCY = 20
AllDigital 'alle ports digital
'port names
Symbol led1 = PORTA.4 'control LED for microcontroller
'A gate set to the desired value
'76543210
PORTA = %00000000 'make all ports "PORTA" low
TRISA = %11111111 'all are set for input.
OPTION_REG.7 = 0 'PORTB pull-ups are enabled
'B gate set to the desired value
'76543210
PORTB = %00000000 'make all ports "PORTB" low
TRISB = %11111111 'all ports are set for input
'C gate set To the desired value
'76543210
PORTC = %00000000 'make all ports "PORTC" low
TRISC = %11111111
main: 'endless loop
led1 = 1
WaitMs 500
led1 = 0
WaitMs 500
Goto main
End
Communication with the 16F883 gives many problems.
I use the oshonsoft software and have the code posted below. Does anyone see what the problem is?
Most likely the problem is in the "Define CONFIG" setting? But I'am not sure.
I have experience with the PIC16F873A never had a problem with it, wants to use the 883 for more analog inputs.
code (text):
'device pic16f883
Define CONFIG = 0x23e1
Define CONFIG = 0x3eff
Define CLOCK_FREQUENCY = 20
AllDigital 'alle ports digital
'port names
Symbol led1 = PORTA.4 'control LED for microcontroller
'A gate set to the desired value
'76543210
PORTA = %00000000 'make all ports "PORTA" low
TRISA = %11111111 'all are set for input.
OPTION_REG.7 = 0 'PORTB pull-ups are enabled
'B gate set to the desired value
'76543210
PORTB = %00000000 'make all ports "PORTB" low
TRISB = %11111111 'all ports are set for input
'C gate set To the desired value
'76543210
PORTC = %00000000 'make all ports "PORTC" low
TRISC = %11111111
main: 'endless loop
led1 = 1
WaitMs 500
led1 = 0
WaitMs 500
Goto main
End