I have the MicroCode Studio Plus installed and am having trouble getting it to connect.
I am using the 18F1320
Here is a portion of my code:
Code:
include "BS2DEFS.BAS"
'OSCCON =$ff 'clock speed
OSCCON = $62
ADCON0 = 0 'diable A/D
ADCON1= 127 'all digital out
define OSC 4
' Set Debug pin port
DEFINE DEBUG_REG PORTB
define DEBUGIN_REG PORTB
' Set Debug pin bit
DEFINE DEBUG_BIT 4
DEFINE DEBUGIN_BIT 2
define DEBUG_PACING 2000
' Set Debug baud rate
DEFINE DEBUG_BAUD 2400
' Set Debug mode: 0 = true, 1 = inverted
DEFINE DEBUG_MODE 1
define DEBUGIN_MODE 1
'TRISA = 0
led1 var PORTA.0
led2 var PORTA.1
led3 var porta.2
led4 var porta.3
led5 var porta.4
x var byte
loop:
debug "hello world",cr ,10
for x = 255 to 1 step-5
pwm led1,x,10
if x < 60 then high led2
'if x < 25 then high led3
next x
When I compile amd program with ICD then click the play button it cannot connect
I can read the "hello world" on the Hyper Terminal

Any Ideas as to what is wrong?
Mike2545
Bookmarks