2
\$\begingroup\$

I'm pretty sure that it's a duplicate in some way but I have to ask anyway. I'm pretty new to chip programming and I got some results using arduino but I still have no idea how to use the pic board my friend gave me.

http://www.futurlec.com/dsPIC30F2010_Board.shtml

It looks good so far. I have 3 cables but I have no idea how to download a program to the board. My question for now isn't that much related to compilation. I have some sample hex files that can be downloaded to the board.

  • usb -> rs232 (plugs in lights are lighting)
  • db9 -> rs232
  • db25 -> 10 female plug (no idea what's the actual name for that plug EMPIC or something)

Since I only have a laptop the only usable cable is usb. I could probably find adapters for the other cables but yeah.

When I plug the usb cable, leds will light and it seems that current is working. On my db9 cable, it's written download rs232 So I kind of assume that downloading a hex file using the rs232 plug should work. But after reading, I believe that this plug might be just for use with the chip and not for programming the chip.

http://www.futurlec.com/Pictures/dsPICBRD4_600.jpg

You can see there that it's just above "download ET-EMPIC"

I can take pictures of my whole set if something isn't clear enough. I'd really love to get working on that chip. I read some of the spec about the chip but couldn't really find anything on how to get started. It's as if people who wrote documentation are assuming that people already know why programmers exists (quite confusing term to be honest), how to use them and how to make things happen.

I'm quite confused and don't understand why it's so hard to actually get something on the board. If someone can help me downloading a hex file to that board I'd be the happiest man on earth for some time.

As far as I understand, this board should be enough to be used without a programmer. But i'm guessing that I have to use the db25 to empic plug. If I have to buy something then I'll probably purchase it. I was also thinking about making my arduino board work as a programmer for my dspic but this isn't really a good option.

Also something I don't understand. The powersupply is requiring 16v while in the docs, I read somewhere that while downloading a program I should supply not less that 14v to the board. I know that my usb cable are providing not more than 5v. Any reason why the programmer would require so much to download the program?

edit

After a bit of research, I found that:

http://www.etteam.com/product/06A07.html

ETT is the actual constructor of the board. Problem is that it's all written in thai. In short I believe it says I have to use winpic800 using ICP plug. It should be possible to program using the ICSP pins but I'd need an external programmer.

\$\endgroup\$
3
\$\begingroup\$

From a quick look at the first link, it seems this board has some kind of programming function built in. That means it should come with software to send the necessary commands over the serial line, then special hardware on the board will wiggle the PIC programming lines appropriately. You will have to get this info from the manufacturer or the reseller, which could be Futurelec in both cases.

The reason the datasheet doesn't go into much detail about how to program the chip is because there is a whole separate document for the called the Programming Specification. A number of similar chips use the same programming protocol, so they document it once.

I have some general de-mystification about PIC programming at http://www.embedinc.com/picprg/icsp.htm.

\$\endgroup\$
  • \$\begingroup\$ Right thank you, I guess I understand a bit more how it works. ICSP is the actual protocole used to program the chip. The programmer is only used to translate data from computer to the chip. Doing direct ICSP is probably impossible using simply rs232. That said, I found that on my board, I can do directly ICSP using a programmer or use the ICP 10-pin plug with WinPic800. So for now, I guess I can't really do anything with it yet. Unless I compile a programmer on my arduino board to download a bootloader that will let me program the pic without programmer. \$\endgroup\$ – Loïc Faure-Lacroix Nov 5 '12 at 23:39
  • \$\begingroup\$ The programming specification really helped here. I ended up rewiring the chip on a breadboard and could program it with a pickit3. One of the problem I noticed on the devboard is that some of the lines weren't properly connected to capacitors/resistors as explained in the document/site. My guess is that the devboard was designed to be used with a different programmer and ICSP pins were there but weren't probably tested. \$\endgroup\$ – Loïc Faure-Lacroix Oct 9 '17 at 12:51
1
\$\begingroup\$

The description of the product has this nugget of info:

"Direct In-Circuit Program Download with RS-232 Connection or standard PIC 6-pin In-Circuit Programming Connection"

Next to the dsPIC crystal, there's a header (which isn't a 1:1 mate but should be workable) with the Microchip PICkit3 programmer:

enter image description here

As far as I know, the only way you could use RS232 to flash the dsPIC30 is if the manufacturer already flashed some sort of mini-OS to accept HEX files over RS232, flash and execute them. There would have to be something in the documentation concerning this.

The description contradicts itself a little further down, though:

"Programs can be downloaded or updated directly to the microcontroller using the in-circuit programming interface. The standard 6-pin Microchip in-circuit programming connections are provided on the board, together with a RS232 connection for computer interfacing." So, maybe it can or maybe it cannot be programmed over RS232. If you use a PICkit3, so long as those programming pins are connected to the part, you're good to go.

Having an official programmer like the PICkit3 allows you to take an image of the device flash, essentially making it brick-proof for when/if your future hacking goes awry.

ICSP on dsPIC parts doesn't require high voltage, there is a low-voltage programming mode. The programmer should be able to provide enough power to program the IC, so long as other devices on Vdd don't consume too much current.

\$\endgroup\$
  • \$\begingroup\$ Actually here, if I'm not mistaken it's written that: dspic30f2010 is not supported for low VDD programming. ww1.microchip.com/downloads/en/devicedoc/… \$\endgroup\$ – Loïc Faure-Lacroix Nov 6 '12 at 12:36
  • \$\begingroup\$ the iscp head are there, I remapped heads to the pickit and I could probably work it out as soon as I find one. And unfortunately, I don't have official disk. \$\endgroup\$ – Loïc Faure-Lacroix Nov 6 '12 at 12:45
  • \$\begingroup\$ This is a PICkit2 document, which has become (for all intents and purposes) an obsolete programmer with the release of MPLAB X. According to the part datasheet, "dsPIC30F devices can be serially programmed while in the end application circuit. This is simply done with two lines for Programming Clock and Programming Data (which are named PGC and PGD respectively), and three other lines for Power (VDD), Ground (VSS) and Master Clear (MCLR)." You should be able to program the device with whatever VDD the PICkit3 can provide, and shouldn't need 12V or anything like that (AFAIK). \$\endgroup\$ – Adam Lawrence Nov 6 '12 at 18:23
  • \$\begingroup\$ I ended up buying a pickit3 and can tell the ICSP header is probably useless here. The big problem is that some pins of the dspic needs to connected to some capacitors. Unfortunately, some of the filtering capacitors are before some transistors and the ICSP header is after those transistors. The programming header (not ICSP) looks like it's receiving inverted signal and drive those transistors. I ended up removing the chip from the board and connected as documented in the datasheet on a breadboard and it just worked. \$\endgroup\$ – Loïc Faure-Lacroix Oct 9 '17 at 12:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.