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.

Deisgn of a PIC dev board (nigel?)

Status
Not open for further replies.

Blueteeth

Well-Known Member
Hi,

I've been tinkering with PIC's for a couple of years now, using the uJDM programmer. And happily programmed 628A's, 84A's, 877A's, 874's etc.. I think its about time I upgraded, I deserve it :D

I'm fed up of having to either unplug the PIC from its circuit into the programmer (and visa-versa) or setup crude ICSP on a breadboard and disconnecting RB7/6 and the osc before programming, and replacing them. So, after a fair amount of research I've come up with a couple of solutions:

- A little circuit I designed to isolate RB7/RB6,MCLR, RB4 during programming, automatically controlled by a ISCP programmer. Should allow me to program the PIC on its board, without having to touch it (no unplugging, switches, jumpers etc..).

- Boot Loader.

Now, I've designed a CPLD dev board and it turned out well, so its the PIC's turn. In my quest for perfection, I would like to be able to use a bootloader (for F877A, F873A F88 etc.) as well as an on-board HV programmer. Both connected to the same serial DB connector, that way, I can sit at my comp either HV program, or run the bootloader without having to disconnect anything. After reading up on 'boot loading' it seems to be very handy indeed, but of course, having the option of standard programming on the board would be nice too.

My question is, has anyone ever seen this on a board before? Also, I really don't want to get a 15V power supply for Vpp, so I'm looking into the simplest voltage boost circuit I can find, from 5v to 13v+. To cap it all, I need a simple programmer that IC-prog can use.

If anyone has any thoughts/suggestions on this (looking your way nigel) I'd apprecite some advice.

Thankyou

Blueteeth.
 
Simple answer - build an ICD2 clone, you already have a programmer, so you can blow the PIC for it.

As for completely switchable programmer/devolopment boards, the Dontronics SIMM stick series had a toggle switch that switched between program mode and run mode. The use of a physical switch means that the isolation is perfect, with no problems you have to work around.
 
Cheers Nigel,

Thought I'd direct the question your way, as you seem to be one of the more knowlegable people on the subject.

I sort of knew you'd recommend an ICD2 type-affair, I'm pretty lazy and I've been wondering where to direct my efforts. You are right about already having a programmer, I was just after perfection, having a single RS232 cable connected from my PC to the board, and being able to use standard programming as well as bootloading, simply by using different software (that uses the same comm port). But it's pretty obvious that a ICSP header and a external 'dongle' would be more than adequate, as I would only 'not' use bootloading if I wanted to use all the code space, which, for the 877A isn't really going to be an issue :D

I think I'll still use (de)multiplexers in the design, to isolate programming pins during HV programming, and to switch the UART between two DB9 sockets (and even to a couple of regular I/O's if a second s/w UART is needed). Sounds complicated, but I've designed a test PCB, it doesn't take up much space, the multiplexers fit under the PIC socket :D

Does anyone have any recomendations about extra things to put on the board? I'm sure many of you have, or have used development boards, so its always nice to get some idea of features you think are handy, or would like to see on the board. I can't do 'everything' but certain 'extra's' are always useful. Jumper set pull-up/down resistors, special headers for peripherals (SPI/I2C/PWM/comparator etc.), programmable clock, LCD header (great debugging tool) buttons, LED's, and of course, standard headers for every port.

Any advice/opinions are welcome,

Blueteeth
 
I've seen a LOT! of development type boards, and even have a number of them - but for my tutorial series I decided on a modular system - it's far more versatile, and the boards are simple to make on veroboard. You do obviously have the added expense of the connectors, but I think it's well worth it!.
 
I don't think it's possible to build a satisfactory "one size fits all" dev board. You have different size PICs 6 pins to 40, just in DILs. Even in the same size package, different PICs have different pin assignments (async on F628 vs F88, for example). Anticipating all future needs is tricky. You will wind up with a lot of jumpers and extra stuff that doesn't get used all that often.

I agree with Nigel on the modular approach. I've build a bunch of plug in modules that seem to work pretty well: max232, LCD header, power supply, ICSP adaptor plus a couple sensor headers. The idea is to make the power pins mate with the BB so all you have to do is run the signal wires. Putting together a test bed is pretty easy. I can be up and running with a minimal design in, literally, minutes.
 
Last edited:
Nigel Goodwin said:
I've seen a LOT! of development type boards, and even have a number of them - but for my tutorial series I decided on a modular system - it's far more versatile, and the boards are simple to make on veroboard. You do obviously have the added expense of the connectors, but I think it's well worth it!.

Well, my design will be modular :D. I can think of MANY different 'attachments' it just depends on how often I'll need them. 'Modules' used quite often will be on seperate daughter boards, with a standard header matching that of the main board (for ribbon cable/IDCor socket) and ones used very regularly can go on the main board, depending on how large their circuits are.

I did consider making a 'piggyback' board, which would be the same size as the PIC, with all pins of the socket going straight trough the board, for breadboarding, and under the PIC, a max232 for bootloading, an ICSP header, and osc. I've done a rough design in eagle, looks good, and doable. But alas, of course, I don't want to make up the power section every time, so for a basic dev board, here's what I think it will definately need.

*Power - DC power jack, 7-12V, regulator etc.)
*Osc - osc socket/crystal socket, and RC osc. Did this for my CPLD board, proved to be very handy, and the whole osc seciton measured 20mmx20mm. All set by jumpers.
*ICSP header - obviously. Possibly with isolation circuit, but not really needed.
*RS232 with max232. - bootloader/general serial comms.
*Header for every port. Each with its own +V/GND

Now, I'm pretty sure all of that could fit on a small board. I've learned some lessons from my CPLD board, high value pull-up resistors for one thing, anythink under 8.2k seems to allow a lot of current to flow (especially with 1k pull ups, and 33I/O's, 5ma per pin = 165ma). As for the 'cost of connectors', I happen to have loads of pin headers and sockets here, doing nothing :D

Optional extra's shouldn't take up much space. As I said, these will simple be 'app specific' headers. No point in having an LCD on board when I could just have a connector, or even use a serial LCD. And things like SPI/I2c would simply come straight off the pins or the headers for those ports. Buttons/LED's/7-seg's/DAC's can all be on external boards, as I could do this with stripboard, and not have to order another batch of PCB's.

Of course, it can't do everything, but I don't want to get a PCB made up only to find I've left something useful out, meaning I have to breadboard something every time I want to use the system, I'll keep it down to the minimum though. This won't be a 'beginners' board, probably not the sort of DIY design that anyone could do, its just a way for me to prototype, using a high-end PIC (all useful peripherals). Its a useful exercise for PCB design, and it uses up some of the components I got laying around here (PIC's, connectors, crystals, DB9's etc..)

Thanks for the advice, good to know you guys are here,

Blueteeth.
 
Blueteeth said:
...
*Osc - osc socket/crystal socket, and RC osc. Did this for my CPLD board, proved to be very handy, and the whole osc seciton measured 20mmx20mm. All set by jumpers.

this is one that I've had on my "to do" list though it's pretty easy to use a crystal and 2 caps on the solderless BBs. I use resonators on my PCBs in general so being able to BB with a 3 pin resonator is a good thing. 3 pin resonators don't work on the solderless BBs.
 
philba said:
this is one that I've had on my "to do" list though it's pretty easy to use a crystal and 2 caps on the solderless BBs.

Yep, also great for quick change of crystal value. But I tihnk I'm becoming lazier in my old age :D The original osc section I did was for a CPLD, which only had a 'clock' input, not like the PIC which has an on-board RC/Xtal driver, so some of the components might be redundant. Only requiring a Xtal socket, 2 caps, a oscillator module socket (modified DIL 14 socket, for both dil14 and dil8 osc's) a RC section, with a cap and a variable resistor.

The original designed had all the above, but used 74HC04 inverters to drive the crystal and RC osc, as well as buffer the osc module. This was because I had some modules that were a value I didn't have as crystals, and the cap on the RC osc was selectable via another jumper, giving the entire section a range of 0.5Hz to 100Khz (RC) and then osc's. The socket also allowed a mini circuit to be plugged in for very specific, odd frequency osc's (built on stripboard) like 14.67Mhz for example.

I spent *far too much* time for something so simple, then again, with a CPLD, any internal 'clock division' would use up valuable resources, so it was needed. PIC-wise, it'll be a great deal simpler.

lol, if you wanted a truely diverse system, you could allow the pic to control its own clock, pulling the crystal frequency of centre, and a reference, you have a PLL. (did it once, proved to be fairly accurate for locking onto serial streams).

If you want, I'll post a schem of what I think a really versatile system would be, of course, you could probably work it out for yourself.

Blueteeth
 
Blueteeth said:
*Header for every port. Each with its own +V/GND

Might be obvious?, but I used ten pin connectors for ALL ports, all wired exactly the same (with 0V one end, and 5V the other), even when there are only a few pins on the port. This means you can plug any board in any port - far better than using different size connectors to match the ports.
 
Nigel Goodwin said:
Might be obvious?, but I used ten pin connectors for ALL ports, all wired exactly the same (with 0V one end, and 5V the other), even when there are only a few pins on the port. This means you can plug any board in any port - far better than using different size connectors to match the ports.

Yeah, thats what I decided upon on my previous board. A 10 pin header (2*5) with pins 1 and 2 GND and VCC respectively. 2-10 were data. Its awkward for making daughter boards on stripboard, but can be done if you cut each track lengthways and solder a pin to a track either side of the hole.

This is great for IDC connectors, but sometimes a quick and dirty approach might needed, so I'm including a 20 way header socket (sil) along each side, so I've got somewhere to plug in random wires for BBing if needs be. Not really more work, because where I have them, the I/O traces go through it anyway. I forgot how difficult PCB design is :D Finding the best place for all the components is proving difficult, because my main rule is that power/RS232 is along one side, and the I/O's are around the edge for easy access. Anything else can go anywhere. I've uploaded a reduced sized jpg from eagle3d of the layout, no traces routed yet though.

Sorry for keep going on about this, but I really do value the opinion/experinces of others, as I am spending a fair bit on the board (got all the parts about somewhere) and although its more complaicated than a simple adapter system, i tihnk its nice and versatile.

Blueteeth
 

Attachments

  • 8933.jpg
    8933.jpg
    110.9 KB · Views: 212
William At MyBlueRoom said:
Did you finish the design?

Hi!

Still Work in progress :D
Hadn't forgot about this, but the 'decisions' got to me and I left it for a while, as I tend to have many different projects going on at once...but I should concentrate on this one for now, as it will make the rest a whole lot easier (most projects are BB prototype type affairs with a PIC). As far as 'electronics goes' its still pretty damn simple, but the physical layout should make it a snap to attach a BB to with with simple wires (because of the sockets, NOT attaching to pins). I could put a hundred jumpers on there, but for now just ones for Voltage selection (3.3/5v) osc, USB connection, DTR to MCLR for remote reset from PC after bootloading, and some for UART - MAX232 connections.

Heres a very basic layout, without any eeprom, LED's or switch matrix. Because of the 'stack' design, I might make all LED indicators (power, RS232 etc..) and switches (power, reset) right angle, as well as all the pin headers.
The main limitation of design is board size (thanks to Eagle's 'free' limitations) as well as easy modular access, easy expansion comes at the cost of reduced 'goodies' on board.

Criticisms are welcome, please excuse the sloppy eagle3d layout, it didn't have a slied switch, or a LED indicator. The Socket at the rear socketis from a PC104 stack design and is connected to every I/O from the PIC socket. I haven't touched this design in months..

Blueteeth
 

Attachments

  • PICdev2.jpg
    PICdev2.jpg
    120.6 KB · Views: 139
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top