Continue to Site

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.

  • 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.

Suggestions for a prototyping PIC board

Status
Not open for further replies.

kf8rd

New Member
Howdy All,
I am a newbie to using microcontrollers and have just finished puting together the Inchworm+. I think it's working ok since I was able to load the operation system. But now I would like to start playing around with it. I assume there are two way to use the programmer. The first is build a project and connect the Inchwork to the finished project to program the pic. The second is to have a carrier board with a ZIF socket and program the pic then put the pic in the project. Can someone suggest a ready made/kit carrier board with a zif socket maybe a prototyping board that works with the Inchworm. Thanks for any help advice.
 
kf8rd said:
Howdy All,
I am a newbie to using microcontrollers and have just finished puting together the Inchworm+. I think it's working ok since I was able to load the operation system. But now I would like to start playing around with it. I assume there are two way to use the programmer. The first is build a project and connect the Inchwork to the finished project to program the pic. The second is to have a carrier board with a ZIF socket and program the pic then put the pic in the project. Can someone suggest a ready made/kit carrier board with a zif socket maybe a prototyping board that works with the Inchworm. Thanks for any help advice.

There is a companion board for the Inchworm called the Firefly with a 16F88 target for learning and an ZIF socket for programming. The 16F88 is a good chip to start with if you are going the 16F route
 
The Firefly was designed as a ZIF socket and / or a 16F88 Tutor.
ZIF is handy for bulk programming but ICD can offer both programming and debugging.
You can also connect the Inchworms ICD connector to a breadboard and your target PIC.
**broken link removed**
 
Thanks for the info! I did not make the connection (no pun intended) for the total use of the Firefly. I think I will place an order for the TZ. That will allow me to learn the PIC with the 16F88 and then use it to program other models for the projects I have in mind. I guess the Inchwork+ and the Firefly make a nice learning/development environment.
 
kf8rd said:
Thanks for the info! I did not make the connection (no pun intended) for the total use of the Firefly. I think I will place an order for the TZ. That will allow me to learn the PIC with the 16F88 and then use it to program other models for the projects I have in mind. I guess the Inchwork+ and the Firefly make a nice learning/development environment.
The Firefly is a fine product (I own one) , but you should also have some **broken link removed** and **broken link removed** and a basic selection of resistors, capacitors, transistors, switches, LEDs, chips, PICs, etc. Then you're able to try out anything you want - not just what's built into the dev board you have.

Like this. Just imagine your Inchworm+ sitting where that PICkit2 is: https://www.electro-tech-online.com/attachments/dspic_spi001sm-jpg.17981/
 
Last edited:
I have a lot of components and breadboards but the PIC is new to me. I was playing around with basic stamp but that seems to be an expensive way to go just to play around so I thought I would learn the Microchips. So, if I have this right. I would use the combination of Inchworm+ and Firefly to program the PIC with the Firefly just being an easy way to attach the PIC to the programmer (and also a tutor to learn) The breadboard would be used to prototype my circuit and I just add the PIC I just programmed using the Inchworm/Firefly?
 
kf8rd said:
So, if I have this right. I would use the combination of Inchworm+ and Firefly to program the PIC with the Firefly just being an easy way to attach the PIC to the programmer
Not really. The ZIF socket is much more difficult and more a pain in the butt than using a simple ICSP connector to your target PIC circuit. ZIF's have their place. They're fine for certain things, but not for everyday experimenting.

When using a ZIF for programming, you pry your PIC out of its socket, put it in the ZIF, program it, pull it out, put it back in its socket, test it, pry it out... Over and over and over hundreds of times. This gets REALLY old really really fast. It's slow and tedious.

With an ICSP connector on your target board (whether it be breadboard or dev board) you simply change your program and tell the programmer to program the chip. No removal of the chip from its circuit is necessary. It's simple and quick.

(and also a tutor to learn)
The tutor is nice. It's a good way to learn some things. The Firefly has an ICSP connector, so you won't be prying its PIC in and out constantly.
 
Last edited:
Oh, another thing. With many PICs, using ICSP, you can do on-chip debugging. You can start and stop your program, single step it, use breakpoints, examine and change registers and memory, all right on the chip, while it's running your program.

Breadboards are the way to go for experimenting, but a good dev board can be a good starting point too. And you can connect the dev board to the breadboard as a way to expand the dev board's capabilities.

For instance, here's a homebuilt dev board connected to a breadboard with a ribbon cable so I can do temporary things without having to solder everything in. The dev board PIC is the brains, but the circuit being controlled is on the breadboard. The small ribbon is the ICSP cable for programming the 18F452 on the dev board.

**broken link removed**

In case you think I'm full of crap cuz I have different programmer than you, I also own an Inchworm+ and the Unicorn USB upgrade for it too. I just use the Junebug/PICkit2 more often these days.
 
Last edited:
Thanks for the info...I think I got it! I think what I was missing was not understanding the "What do you need to program the PIC" So, if I got it right this time, I can breadboard my entire circuit PIC and all on a solderless breadboard and include the needed ICSD pins (VPP, VDD, GND, PGD, PGC ) and connect this to the Inchworm and i'm good to go. I the Firefly would still be a good learning platform.
 
kf8rd said:
Thanks for the info...I think I got it! I think what I was missing was not understanding the "What do you need to program the PIC" So, if I got it right this time, I can breadboard my entire circuit PIC and all on a solderless breadboard and include the needed ICSD pins (VPP, VDD, GND, PGD, PGC ) and connect this to the Inchworm and i'm good to go. I the Firefly would still be a good learning platform.
Yes. You got it.

Build yourself one or more of these for connecting your ICSP cable to the breadboard. The male connectors are cheap and easily available. The reason the header is missing one pin is that it was a USB connector that was salvaged off an old computer mainboard. That pin isn't needed anyway so I didn't cut a new piece of header:
icsp_conn001sm.jpgicsp_conn002sm.jpgicsp_conn003sm.jpgicsp_conn004sm.jpg
You can get free programming cables by ripping parts from ancient pre-pentium computers and assembling two old serial cables into one programming cable. Or you can buy them new from SparkFun or other company. Or just buy the connectors and build your own cables using ribbon from old floppy/IDE cables.
 
Last edited:
Another option which I found handy was to choose a PIC with "self programming" capabilty and program it once with a "bootloader". After that I would download new programs onto the PIC via the bootloader using the PIC and PC serial ports and Hyperterminal 'front end'... No programmer necessary...
 
Mike said:
Another option which I found handy was to choose a PIC with "self programming" capabilty and program it once with a "bootloader". After that I would download new programs onto the PIC via the bootloader using the PIC and PC serial ports and Hyperterminal 'front end'... No programmer necessary...
Ya, bootloaders are ok. But you already have a programmer. Why bother with a bootloader that eats up part of your memory, programs slowly, and adds unnecessary complexity (not that much really) to your programs.

You own a programmer. :D A bootloader isn't necessary anymore. Whether you have to put a ICSP connector or a serial connector on your target board makes almost no difference. Either way you put some kind of connector on there. Probably the ICSP is easier anyway.
 
If you prefer having your Laptop, Programmer, and Project board all laid out in front of you during your development sessions, that's fine. There's nothing wrong with that. Myself, I find it faster and more convenient using just my Laptop and Project board (programmed with a serial bootloader) which also seems to be a bit more portable (I always carry my Laptop and my Project board may be small enough to fit in a shirt pocket). I also don't have to dedicate (sacrifice) my PIC ICSP pins or take up board space for an ICSP connector.

Bootloaders aren't for everybody and I haven't found one I really liked and so I write my own. Both 16F' and 18F' versions use less than 256 words of program memory. My bootloaders don't require a proprietary PC 'front end' but use Hyperterminal instead (which comes with the PC). I also use any existing pin that's connected to a switch or speaker or something like that as the bootloader 'trigger'. That is, if there's a switch connected to RC0 for example, the bootloader simply tests to see if that switch is pressed during "power up" or after a "reset" to 'trigger' the bootloader. This makes it extremely easy to get into and out of the bootloader during the development process. For example, I press and hold the switch connected to RC0 and press the "reset" push button to bring up the bootloader. I download the new hex file using Hyperterminal. Then I press "reset" again to restart the Project board with the newly downloaded program. The whole process takes only a few seconds.

Yes, you do need to modify your application programs to operate correctly with a bootloader. This is easy for assembly language programs but requires a little more work for C or BASIC programs;
Code:
;
;  16F' assembly language example
;
Start   equ     h'0100'         ; bootloader present

        org     Start+0         ; 0000 or 0100 (bootloader)

Reset_Vector
        clrf    STATUS          ; force bank 0, IRP 0             |B0
        goto    Main            ;                                 |B0

        org     Start+4         ; 0004 or 0104 (bootloader)

Interrupt_Vector
Regards, Mike

< picture below of Hyperterminal screen after a program download and just before pressing "reset" on the Project board to start the new program>
 

Attachments

  • 16F88 Bootloader.PNG
    16F88 Bootloader.PNG
    31.8 KB · Views: 153
Last edited:
I use a bootloader only if I want the customer to update the firmware sans programmer. It's not a great development tool IMO.

Neat trick, the Junebug (PICkit2) has a USB bootloader when you hold down the button when powering it on. I think I saw a FT232 emulator that uses it.
 
Well, some people (you included if I recall correctly) object to dedicating a pin to 'trigger' the bootloader and so that's why I try to use an existing pin with something attached to it. A switch is most convenient but since almost all of my projects include a piezo speaker connected directly to a pin for switch press beep feedback, I layout pcb's with a pull-up resistor on that pin and a jumper between the pin and the piezo speaker. This allows me to pull the jumper and the bootloader will read a '1' on that pin after "reset" or read a '0' with the jumper in place. And so I don't have to dedicate a pin just for the bootloader 'trigger'.

Yes, the ability for a customer to download an updated program without a programmer could come in handy but in that case I think I would use a custom PIC firmware and custom PC 'front end' to make the process as bullet proof as possible.

Mike
 
Mike said:
Well, some people (you included if I recall correctly) object to dedicating a pin to 'trigger' the bootloader and so that's why I try to use an existing pin with something attached to it.

I object to it as well, which is why I always use a bootloader that doesn't require a trigger pin - just the normal serial interface to the PC.
 
Well I wouldn't dedicate a pin for the trigger either but I don't have any problem double tasking a pin that's already being used for something else (grin).

Mike

<added>

I've attached my 16F88 v2 bootloader source code below just in case anyone would like to look at it. The 16F88 programming algorithm is a bit different from other 16F' devices and I remember having trouble squeezing it all into 256 words along with my 64 byte 'row' buffer method which allows processing of native MPLAB hex files which may have holes or gaps in program memory space.
 

Attachments

  • 16F88 Boot 2.asm
    16 KB · Views: 122
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top