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
New User - Problem with MicroBrn and example code
Moderators: David Barker, Jerry Messina
-
- Swordfish Developer
- Posts: 1473
- Joined: Fri Jan 30, 2009 6:27 pm
- Location: US
Re: New User - Problem with MicroBrn and example code
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!
see http://www.embeddedforu.com/microcontro ... rogrammer/ for some hints.
Good luck!
Re: New User - Problem with MicroBrn and example code
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
Thanks,
John
- David Barker
- Swordfish Developer
- Posts: 1214
- Joined: Tue Oct 03, 2006 7:01 pm
- Location: Saltburn by the Sea, UK
- Contact:
-
- Swordfish Developer
- Posts: 1473
- Joined: Fri Jan 30, 2009 6:27 pm
- Location: US
Re: New User - Problem with MicroBrn and example code
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.
MPLAB has a command-line tool to drive it (PK3CMD.exe) and that can be integrated into the Swordfish IDE.