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.

Microchip PIC programming thingys

Status
Not open for further replies.

grrr_arrghh

New Member
Hi

at school, our electronics teacher started to try to teach us about PICs, but didn't get very far, because our exams took over.

However, he had got some kits made by Microchip, that had the PIC in situe in the final product (rather than having a separate board for programming the chip, and then transfering the chip), and it had a stereo 3.5mm headphone socket, and a serial-to-3.5mm jack lead. This meant that he could then plug the finished item into a computer and re-program it.

Best of all, it was less than £10, not having all the 'development boards' that you usually have to buy. I have looked around for these (including on the microchip website) but can find no trace. I wonder if anyone knows what I'm on about, or even has any idea where I can get them from?

Its the school holidays, so I can't ask my teacher, and I thought as I had some time off school, this might be a good time to start learning about PICs

thankyou all

Tim
 
It's probabely just a experimenter board with a pic installed wich is preprogrammed with a bootloader. All required is a serial link to a pc, wich requires 3 wires... just the amount of connections on the stereo jacket...

Search on google about bootloaders for pic, there are lots of 'em around...
But do note that only the 'larger' pics support bootloading
(16f876 - 16f877 etc) pics like a 16f628 don't have bootloader capability

You still need to make a normal pic programmer tough. To upload the bootloader itself to the pic. This is only done once.
 
You are on about a PICAXE

www.picaxe.co.uk i think.

They are good for quick prototyping, but painfully slow and very limited on features / program space. Ideal for schools really.

They have a programming enviroment called Programming Editor which has a BASIC and Flow Chart editor for creating your programs (you can use either flow chart or basic, but u can convert a flow chart to basic but not the other way round unfortunatly).

The Programming is done via the COM ports using a stereo plug/socket. (these plugs and sockets are quite a good idea even for normal PICs as u dont need to use a full size D socket ;) although there is one grounding problem as the ground part of the plug is the tip, but i have never had trouble).

The socket then uses a pull down (10K) and current limiting registor (22K) on the RX to the PIC (the TX From the computer) and a direct line to the RX of the computer from the TX of the PIC. I do not have much of an idea what this does, but i know it creates a +5V to 0V output which is inverted or somming.

The PICAXE itself has a firmware program on it which downloads the program (a tokenised series of instructions for those of you who care) and stores it on the PIC, i think it uses the program space.

It is a nice system to use when you need something working quickly with kids or even if you dont want to bother with assembler / PIC Programmers and alike. I know there have been some interesting projects with it, even had one online at one point.

------------------------

Just as a side note, i would suggest you get more into bootloaders that the above type of PIC use. I use the bootloader that you can get from www.sparkfun.com and it is great (for the 16F877A/876A/873A/88) i am using 2 pics in my current project and both have the bootloader on them. I have a max232 connected to each PIC, the 16F873A uses a normal D connector and the 16F877A uses the PICAXE cable / stereo socket connected to the MAX232 and i have both connected to my PC's COM ports.

I have 2 instances of the downloader program running and when i need to download an update i close the hyperterminal for that pics COM port and then click download, hit the PICs reset pin and the download takes place.

I use the downloader at 115200 kbps so it is faster that a normal PIC programmer, expecially when you take into account the removal of the PIC from the circuit to do so.

Regards,

- Martyn
 
Bootloaders should only really be used in a project that is to be shipped to a user that doesn't have a pic programmer.

For hobby use or projects that will never be updated by the user (i.e. a washing machine), use the In-circuit serial programing (ICSP) cababilities of the PIC 'F' range of devices.

This allows code to be reloaded over and over quickly and doesn't require 500 bytes of program space for a bootloader codeblock.

You will also save money because you wont have to buy a maz232 converter, those 1uF capacitors, the cable and the 9pin connector.
 
pittuck, yep I think it was PICAXE, because I remeber him talking about it being a 'revolution' product.

I will look into PICAXE in more detail.

thanks everyone

Tim
 
grrr_arrghh said:
pittuck, yep I think it was PICAXE, because I remeber him talking about it being a 'revolution' product.

I will look into PICAXE in more detail.

The PICAXE is incredibly good value, it costs barely more than a blank PIC, and it includes a BASIC interpreter.

However, it is very limited, as an interpreter it runs fairly slowly, and it's got very little program memory - the BASIC program is run from the internal data EEPROM - which is 128 bytes for a 16F628.

But it is just a PIC, so you can simply unplug the PICAXE from a circuit, and replace it with a standard PIC - so it's very useful for making small projects, or for testing hardware for larger ones (then moving on to using a 'proper' PIC).
 
kybert said:
Bootloaders should only really be used in a project that is to be shipped to a user that doesn't have a pic programmer.

For hobby use or projects that will never be updated by the user (i.e. a washing machine), use the In-circuit serial programing (ICSP) cababilities of the PIC 'F' range of devices.

This allows code to be reloaded over and over quickly and doesn't require 500 bytes of program space for a bootloader codeblock.

You will also save money because you wont have to buy a maz232 converter, those 1uF capacitors, the cable and the 9pin connector.

First of all, bootloaders can be as small as 100 words, wich is hardly a loss of space.
secondly, I've seen ICSP fail dozens of times when using somewhat longer cables, a serial connection hasnt got this problem, and your bootloader code can hold custom error handling code.
Also, if your project already has a connection to a computer to do its main task (this doesn't have to be a RS232 connection, it can be a network connection, usb, IR, ... ) then it is much easyer and cleaner to use this same connection for software uploading
And you don't need a max232 with caps to make a serial interface to a computer, a diode and a resistor is enough
 
Thanks guys, I knew I could rely on youto come up with plenty of info!

Ok, so in eveyone's opinions, if I want to lean about PICs, am I better of looking at the PICAXE things, or just finding a PIC tutorial, and learning about 'proper' PICs?

Cheers,

Tim
 
I would say the latter.

And find a decent tutorial, I've seen countless tutorials on the net wich define registers like TRIS and so on themselfves in stead of using the mpasm include files and other silly stuff like BSF 5,3 to switch banks in stead of BSF STATUS, RP0, wich makes much more sense...

Its better to learn it the right way.
 
The sparkfun bootloader is 180 code words, has checksum and boot vector and boot program protection. And considering the chips have 4k or 8k program space its hardly anything.
 
And find a decent tutorial, I've seen countless tutorials on the net wich define registers like TRIS and so on themselfves in stead of using the mpasm include files and other silly stuff like BSF 5,3 to switch banks in stead of BSF STATUS, RP0, wich makes much more sense...

can u give a link??????

all the tutorials ive seen on the net use TRIS.
 
As an experienced picaxe user i think it is safe to say that PICAXE is only good for learning how a microcontroller works and that sort of thing...

The real muscle behind this bootloader program is the PIC itself, it is better to harness the power directly than through a bootloader. So give yourself some time to play with the PICAXE and then move on to the big stuff by porgramming directly in Assembly.

It is much more economical this way, more ram, program memory, faster timing and more pinouts. If you wanna go further than that then go over to Atmels AVRs.
 
samcheetah said:
And find a decent tutorial, I've seen countless tutorials on the net wich define registers like TRIS and so on themselfves in stead of using the mpasm include files and other silly stuff like BSF 5,3 to switch banks in stead of BSF STATUS, RP0, wich makes much more sense...

can u give a link??????

all the tutorials ive seen on the net use TRIS.

I haven't made a bookmark of the site since i didn't like it. If i bump into it again i'll post it.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top