Page 1 of 1

New User - Problem with MicroBrn and example code

Posted: Tue Sep 25, 2018 4:34 pm
by M0DJH
Hi,
I would really appreciate it if sdomeone can help me with this problem:

I was given a block of code to try out the USB port on an 18F4550 chip which I have pasted below. It compiles with no errors or warnings but when I try to load the hex file into microbrn it produces an error. The error says

Error in Hex File - Fuse
Line 4


This is the code:

Device = 18F4550
Clock = 48

// 20Mhz crystal, 48Mhz internal (FS USB)
Config
PLLDIV = 5,
CPUDIV = OSC1_PLL2,
USBDIV = 2,
FOSC = HSPLL_HS,
VREGEN = ON

// import modules...
include "usbcdc.bas"

// wait for connection...
repeat
until Attached

// main program loop - this just simply reads a byte from a
// terminal window (for example, SerialCommunicator) and then
// echos it back...

while true
if DataAvailable then
WriteByte(ReadByte)
endif
wend}


If anyone can try this or tell me what is wrong it would be greatly appreciated.

Thanks,

John

Re: New User - Problem with MicroBrn and example code

Posted: Tue Sep 25, 2018 5:05 pm
by Jerry Messina
I've never used microbrn, but evidently it has a problem with config settings and you have to "fix" the hex file using fixhex2.exe. It also seems to have issues with eeprom data as well... doesn't seem to be a very good app (or maybe it's just ancient).

see http://www.embeddedforu.com/microcontro ... rogrammer/ for some hints.

Good luck!

Re: New User - Problem with MicroBrn and example code

Posted: Wed Sep 26, 2018 7:14 am
by M0DJH
OK, thanks for the post. This remedy uses MPLAB but I am using the swordfish IDE. Please can you suggest a programmer that I can use with the Swordfish IDE that can program using ICSP directly from the IDE that does not require 'fiddling' with the Hex file everytime.

Thanks,

John

Re: New User - Problem with MicroBrn and example code

Posted: Wed Sep 26, 2018 7:38 am
by David Barker

Re: New User - Problem with MicroBrn and example code

Posted: Wed Sep 26, 2018 11:04 am
by Jerry Messina
You can also use the Microchip ICSP programmers like the PICkit3 http://www.microchip.com/Developmenttoo ... s/PG164130

MPLAB has a command-line tool to drive it (PK3CMD.exe) and that can be integrated into the Swordfish IDE.