• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

a dumb question - dsPIC'4013 programming

Status
Not open for further replies.

dougy83

Well-Known Member
Hi, I would like to program a dsPIC30F4013 for a little test, but I can't get it to do anything. I can't program it with an ICD2 clone, however I can program it (according to winpic prog S/W) with a JDM-type prog cct.

Does anyone have a known-to-be-working compiled .hex file to make it do something; e.g. flash LED, output pulse, etc. I'm not after anything fancy, I just want to know if my setup is suitable for this pic. Configuration for internal oscillator would be preferred if it's not too much to ask...

Thanks!
 

dougy83

Well-Known Member
Thanks Mike. It may help, I'll try it tonight, I'll have to get the C30 compiler.
 

Solidsnake

New Member
The dsPIC30F4013 works a lot like other pics except the dsPIC series (most of them) has got a lat register and a port register. To be able to make a LED blink, you need to write to the lat register. BUT, for other applications where you want to use a port as an input, you need to read from the port registers. In short. Read from the port, write to the lat.

Also remember to set the ADPCFG = 0xFFFF to set the pins as digital.

Hope that helps.
 

dougy83

Well-Known Member
Thanks for the reply. This thread is as old as the hills, and I didn't expect anyone to reply to it. Anyway, the problem was that the ICD2 (a stolz clone) is a piece of junk: when I coughed up some money (it's surprisingly cheap) for a PicKit2, my code worked first go.
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top