Jump to content

18f67j60 Debug Problem


Recommended Posts

I'm not sure if this is a bug but I have a hard time to figure out how to debug the 18F67J60.

It might be a complete missunderstanding from my side of the 18F67J60 way of working :-),

anyway I need some help, please.

 

I'm back to a very simple setup program for port B that works ok for a target chip like 18F452.

 

When I recompile the program for the 67J60 chip it behaves different.

 

I connect a "plugin led" on port B pin 1 just to have a visual indication.

 

IDE 6.87 and BoostC on a WinXP PC.

 

Feedback needed :-)!

 

/LasseT

 

 

*********************************************

 

 

My very simple testprogram

==============================

 

#include <system.h>

#include <boostc.h>

 

/*

Connect a "plugin led" to portb pin 1

then try to make it turn on and off.

Simple enough :-)))))))))))))

*/

 

/*

Test setup for 18F452 and 18F67J60

It works for the 452 but I can not make it work

in debug mode for the J60 chip.

And YES I recompile when changing targets :-)

*/

 

char i;

 

void main()

{

trisb = 0b00000000; //Set port B all output

 

for(i=0;i<3;i++) //Just a simple loop to feed some data to the port

{

latb = 0xff; //latb will control portb even for the 18F458

latb = 0x00;

latb = 0xff;

 

portb = 0x00;

portb = 0xFF;

portb = 0x00;

 

}

//Lets try a new setup

asm //according to Microchip :-)

{

clrf _portb //; Initialize PORTB by

//; clearing output

//; data latches

clrf _latb //; Alternate method

//; to clear output

//; data latches

movlw 0xF0 //; Value used to

//; initialize data

//; direction

movwf _trisb //; Set RB<3:0> as inputs

//; RB<7:4> as inputs

}

 

for (;:(

{

set_bit(portb,1);

clear_bit(portb,1);

set_bit(portb,1);

clear_bit(portb,1);

}

}

 

 

===========================

end of simple test program

Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...