PDA

View Full Version : Top2049 programmer and 18f4550 config



inspired4real
- 12th August 2009, 07:00
Hi all, dont know if anyone has used the top2049 programmer to program the pic18f4550. I think i am having problem with config word. The top2049 software always want to write config from its interface and i dont want that. I want to add config from my program. But it seems the config set in the programmer software always override the config i set inside my compiler software. I am trying to implement a usb fucntion and setting config from the programmer software is not pleasant at all. And the programmer being from china or so is not well documented in english.

mackrackit
- 12th August 2009, 11:02
Have you used that programmer with other chips? Did it work with those? Or is the 18F4550 the only chip you are having trouble with?

inspired4real
- 12th August 2009, 22:34
thanks for taking a look at my problem mack. i have used the programmer with other chips and they work fine. the fact is just that the pic18f4550 oscillator settings for cpu and the usb peripheral is a bit complicated stuff even with the data sheet. the topwin software is from www.top2048.com. i have used it to program same pic18f4550 to turn on and turn off led at i second interval and it worked fine. i think the config for the usb peripheral is the major problem i am having. thanks again.

mackrackit
- 12th August 2009, 23:00
I took a quick look at the top2049 software earlier and I did not see where it was doing anything with the fuses other than write protect. I may have missed something?

Here are the config settings I am using for a 4550. The resonator I have connected is a 4Mhz.


DEFINE OSC 48
@ __CONFIG _CONFIG1L, _PLLDIV_1_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L
@ __CONFIG _CONFIG1H, _FOSC_HSPLL_HS_1H
@ __CONFIG _CONFIG2H, _WDT_OFF_2H & _WDTPS_512_2H
@ __CONFIG _CONFIG3H, _PBADEN_OFF_3H & _MCLRE_OFF_3H
@ __CONFIG _CONFIG4L, _LVP_OFF_4L & _ICPRT_OFF_4L &_XINST_OFF_4L

Also you may find this useful.
http://www.picbasic.co.uk/forum/showthread.php?t=543

If you post your code and configs it will help.

inspired4real
- 13th August 2009, 00:15
Thanks for your concern again mack. You see now you have set the config in software isn't it? Right! Now in my previous projects with top2049 i realize that the default state of the programmer config word when it is launched is used to program the pic and that means the ones i have embedded in the compiler software was obviously of no use to it. If i can tell the topwin software to just use the config from my compiler that will be fine. Instead it takes you to something that looks like have a complete data sheet and you start to configure each bit by bit changing 1 to 0 or 0 to 1. Actually i get how to set config in compiler, but my experience shows that this programmer always use config from its own software. So if you fail to start setting config fuses again in its software and think you have embedded the config in your program, your code will not work, just telling you from my experience. So it boils down to how do i set 1 and 0's in 18f4550 datasheet in each config word from 300001 address upward to use 4mhz xtal and get 48mhz for usb and also run the cpu at 48mhz. Thanks for your time. You can download the software and run it, select 18f4550 and click config, see all the option it gives you, then you will see what i mean. Is the config embedded in the hex file generated or it just exist on its own. I once read some programmer software simply do not know what to do with config settings embedded from compiler software, and so you end up setting it in software, just use ic prog as a case study.:)

mackrackit
- 13th August 2009, 00:48
It is in the hex file. I think the next to the last line.

This is the hex from the config I posted earlier with WDT turned on though

:08000000E0FEFFF3FF7D9BFF12

Other than that I do not know... Sorry.