Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > General Electronics Chat


General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion?

Reply
 
LinkBack Thread Tools Display Modes
Old 29th August 2004, 02:36 PM   (permalink)
Default Pic Programming software

Hi.

I've decided to 'take the leap' in pic, and will buy probably buy the P16PRO40 from Quasar (only £10!), but need some software to go with it.

I have seen software, thats free to download, like Nigels, but I was remembering our school electronics lessons *sigh* where they kept going on about a method of programming PICs, that was very simple.

The code would look something like this, I think...

01 Pin4 High
02 Delay020
03 Pin4 Low

in its simplest form, anyway. I reckon I could understand that, without to much trouble, so can anyone recommend a free downloadable pic progger that will allow me to program in whatever language that it...?

Also, with pic progging hardware, some connect via serial, and some via parallel. Is this where the difference ends?

Cheers,

Tim
grrr_arrghh is offline  
Old 29th August 2004, 03:09 PM   (permalink)
Default Re: Pic Programming software

Quote:
Originally Posted by grrr_arrghh
I have seen software, thats free to download, like Nigels, but I was remembering our school electronics lessons *sigh* where they kept going on about a method of programming PICs, that was very simple.

The code would look something like this, I think...

01 Pin4 High
02 Delay020
03 Pin4 Low

in its simplest form, anyway. I reckon I could understand that, without to much trouble, so can anyone recommend a free downloadable pic progger that will allow me to program in whatever language that it...?
You can use Winpicprog, all that WPP does is upload a .HEX (a 'machine code' file) file to the pic trough your P16PRO40 hardware. The creation of this .HEX file is done with a compiler, a programming language. You've got diffirent options: assembler, C compilers, Basic compilers and some compiler that your school uses. But basically, every one of them will output a .HEX file at the end wich is what WPP uploads.

Quote:
Originally Posted by grrr_arrghh
Also, with pic progging hardware, some connect via serial, and some via parallel. Is this where the difference ends?
All that parallel programmers do is 'bit bang' the IO lines to the pic directly and the programming signals are created directly by the pc.

Most good serial programmers have a controller on board, The pc sends the data to the controller on the programmer board, and it's the controller that does the actual programming.
Except JDM, wich is a exception. It uses the handshaking lines of the serial port to bit bang the IO lines, in a way very similar to the parallel ones, except that it uses the serial port itself as a power supply. Because some serial ports don't supply enough voltage JDM tends to give problems on some computers.

I think parallel ones are the best, because they are a straigt interface to the pc. Support for new pic's only requires an update of the upload software. while adding new pic's to a serial one with onboard processor sometimes requires the onboard processor to be reprogrammed.
Exo is offline  
Old 29th August 2004, 03:19 PM   (permalink)
Default Re: Pic Programming software

Quote:
Originally Posted by Exo
The creation of this .HEX file is done with a compiler, a programming language. You've got diffirent options: assembler, C compilers, Basic compilers and some compiler that your school uses.
Oh. Ok, so are there programs that could help a beginer to write the code, and then output it as a .hex file? Or would I have to write the code myself (using whatever tutorials etc that I could find), then use a compiler to turn it into a .hex file, and then use some like WPP to upload it to the chip?

thanks,

Tim
grrr_arrghh is offline  
Old 29th August 2004, 03:23 PM   (permalink)
Default

I would suggest downloading MPLAB IDE from microchip's website, Look and learn from Nigel's tutorials and other examples on the net and start your programming in assembler.

Whatever higher language you want to use, C, basic or any other, you cannot effectivly program if you don't have a grasp on the basic design and concepts of the pic. And the only way to get to know any CPU is to learn it's assembly
Exo is offline  
Old 29th August 2004, 04:40 PM   (permalink)
Default

Thanks very much!
grrr_arrghh is offline  
Old 29th August 2004, 06:49 PM   (permalink)
Default

having read part one of Nigels tutorial, and various things found on the net, I have a couple of questions.

The code in Nigel's tutorial, (which he also has available for download in .asm format) are written in what language?

MPLAB will quite happily take the .asm files and export them as .hex files, but it also has a 'build' option. The help file confused me even more when i looked this up, so can anyone explain what this is/does?

Cheers,

Tim
grrr_arrghh is offline  
Old 29th August 2004, 07:21 PM   (permalink)
Default

Quote:
Originally Posted by grrr_arrghh
The code in Nigel's tutorial, (which he also has available for download in .asm format) are written in what language?
They are in MicroChip assembler, hence the .ASM at the end. This is what PIC's use, any other language simply produces assembler than assembles it to produce a HEX file.

Quote:
MPLAB will quite happily take the .asm files and export them as .hex files, but it also has a 'build' option. The help file confused me even more when i looked this up, so can anyone explain what this is/does?
I never use MPLAB (I also found it very confusing, it does a great deal more than I want to!), I just use the assembler part of it, MPASM for Windows, this takes the .ASM file and assembles it to give a .HEX file for loading into WinPicProg.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now  
Old 29th August 2004, 08:29 PM   (permalink)
Default

ah, ok, fair enough.

Cheers guys!

Tim
grrr_arrghh is offline  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 02:35 PM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker