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.

pic compiling/programming questions

Status
Not open for further replies.
There is something i dont get, on this page, they say the pickit2 programs 8/14/20 pins and a guy on a forum said that he succesfully programmed the 16f628a,wich is 18 pins ???

The PICKit2 is an ICSP, it can program any size of PIC, size makes no difference.

The early software versions of the PICKit2 only programed a very limited selection, but software updates now make it an excellent programmer that covers a large range.

**broken link removed**

EDIT:

Never mind for the pickit2, i would need a 2nd programmer to make it work.


How do i get an .asm file to send in mpasm? i need mplab sim?

It's just a text file, Notepad is all you need - and is what I used for many years.

Does anyone knows about the pic programming thing,some people just build a very simple circuit to program one type exclusively of pic ( ex: 16f628a) but where can we get information of where to connect the pic pins? assuming that i use serial port of printer an ic-prog/winpic800 . On ic-prog website they claim there freeware can program almost all the pics, but they dont give a programmer for all.

Check out the various programmers on my website, all are parallel port programmers, I don't consider (so called) serial port ones to be reliable enough to support.
 
The PICkit2 (and compatibles like my Junebug) come preprogrammed. Why would you need a second programmer?

The clone version needs a bootloader or something like that, so you need to program a pic, like the propic2 gold.

EDIT:
Okay, i have mpasm, i made a notepad file and when i want to compile a lot of error boxes appears like: error :" notepad document name". I called my notepad file .asm .What am i getting wrong? can someone write a small program, so i can try it out to see if i am the problem.

STATUS equ 03h
TRISA equ 85h
PORTA equ 05h

bsf STATUS,5
movlw 00h
movwf TRISA
bcf STATUS,5
Start movlw 02h
movwf PORTA
movlw 00h
movwf PORTA
goto Start
 
Last edited:
Your sure going to have a hard time with this if you don't slow down and read more about it before you get started. When I first started I ordered some pic32 chip looked real good reading the datasheet. I was going to make the programmer for it to LOL. When the chips got here and I looked at them I said what was I thinking there so small I can't see witch pin is what. 80 pins on a 3/8 square. So I got a pickit2 with the low count development board worked my way thew lessons That it has and looked at how the development board was made and made boards like it that can hold what ever chip I want to use.Then I found Nigels site and made his boards to and use them to. You get Mplab from witch I think you said you have Start it up and go to File
1. open go to C://Program Files/Microchip/MPASM Suite/Example/TUTOR
open that one up and save it to
2. Make a New folder at C:/MyfirstAsm save as TUTOR in your new folder close all the windows in Mplab
3. Open Project then use the Project Wizard set you device what your using
4. Set tool suite to Mpasm
5. browse to C:/MyfirstAsm open it up
6. save what ever name you want to name it
7. add your TUTOR.asm and click next
Look at that code and see what its all about
 
Thanks be80be , i build succeded the program that i shown up there ^ but i dont know where to find the resulting .hex file, i will search later...

Nigel Goodwin:

The serial programmer on your website only supports the 16c ...
 
The .hex files usually compile into the directory where the source code is.
 
How can i know what information to send on what pin of the chip with ic-prog? (db9 port)?
Where can i find this information? And how Bonny Gijzen knew where and how to send the decoded (for the chip) hex file? Is it avalible information?(datasheet)
 
How can i know what information to send on what pin of the chip with ic-prog? (db9 port)?
Where can i find this information? And how Bonny Gijzen knew where and how to send the decoded (for the chip) hex file? Is it avalible information?(datasheet)

I suspect he possibly took it from the 16 bit version of WinPicProg originally, the source code of which I released, as he used the disassembler code from it entirely untouched.

But apart from that you simply download the 'programming reference datasheets' from MicroChip - there should be one for every chip.
 
I just want to make a unique pic programmer (16f62a), i read the programming datasheet but what i need to know is where to connect the db9 output of ic-prog on what pin of my pic. Of what i understand, ic-prog reads the *.o file and send it per pack of 14 bit (16) and a programming clock because the .o file is just a stream of 0111000100101. But where do i send this information? I think that i have set a pin to enter into prog mode and to send then the 14 bit data at 12 to 14 volts, then set the clock and repeat, but i could be very wrong, this is just a guess.
I would need to know that because i dont really want to make and big universal programmer like propicII.
 
Last edited:
I just want to make a unique pic programmer (16f62a), i read the programming datasheet but what i need to know is where to connect the db9 output of ic-prog on what pin of my pic. Of what i understand, ic-prog reads the *.o file and send it per pack of 14 bit (16) and a programming clock because the .o file is just a stream of 0111000100101. But where do i send this information? I think that i have set a pin to enter into prog mode and to send then the 14 bit data at 12 to 14 volts, then set the clock and repeat, but i could be very wrong, this is just a guess.

You are VERY, VERY wrong.

Even down to file you need, which is a *.HEX one.

How can you have read the programming datasheet and not have the faintest idea about it?.

I would need to know that because i dont really want to make and big universal programmer like propicII.

Programmers are essentially the same for almost all PIC's, it's only the software which changes - as you obviously don't have the slightest clue what you're doing, I suggest you simply build one of the many programmers out there, and use existing software.

Or, better still, buy a PICKit2 or a clone like the Junebug kit.
 
That would be fun
Programmers are essentially the same for almost all PIC's, it's only the software which changes - as you obviously don't have the slightest clue what you're doing, I suggest you simply build one of the many programmers out there, and use existing software.

Or, better still, buy a PICKit2 or a clone like the Junebug kit.
 
On the propic2, there are 7 inputs(d0 to d5 and ack), is it the same for all the basic programmers with ic-prog? Does it changes with a different software?
What is the d0 to 5? Does it stands for data?
What is ack?

I tought that universal programmers would be more complex due to the fact that the pin postion on each pic would change( mclr,etc.) so a 40 pin zif is needed and thats it...

I just need to know what pin of my db9 i have to connect to what pin of the pic and at what voltage. The icprog website only gives you programmers, but not a single clue of what pin of your db9 does what. If you are too lazy, just give me a link.

You are VERY, VERY wrong.

Even down to file you need, which is a *.HEX one.

The only files that got out mpasm where .err .lst and .o .
What are these.

So it's icprog that encode the hex file?

And i will read the prog datasheet( i didn't knew that it was containing useful information,so i just flew over it).
 
Last edited:
On the propic2, there are 7 inputs(d0 to d5 and ack), is it the same for all the basic programmers with ic-prog? Does it changes with a different software?
What is the d0 to 5? Does it stands for data?
What is ack?

Those are all nothing to do with the PIC programmer, they are pins on your computer parallel port.

Programmer software is usually configurable for the precise pin layout you require.

I tought that universal programmers would be more complex due to the fact that the pin postion on each pic would change( mclr,etc.) so a 40 pin zif is needed and thats it...

That's only on the output side of the PIC programmer, and not really part of it. Something like the PICKit2 makes that completely irrelevant by simply providing the lines which connect to the PIC for ICSP, although of course you can simply connect those wires to a socket and program the PIC in that.

I just need to know what pin of my db9 i have to connect to what pin of the pic and at what voltage. The icprog website only gives you programmers, but not a single clue of what pin of your db9 does what. If you are too lazy, just give me a link.

Look at the circuit for any programmer, there are various ones on my site.

What has a DB9 got to do with anything?.

The only files that got out mpasm where .err .lst and .o .
What are these.

So it's icprog that encode the hex file?

No, MPASM generates it, it's the output file that your programmer software needs.
 
db9 is the name of my computer port...

So *.o is the file that i have to send to ic-prog.

ICSP Overview
PICs are programmed using 5 signals. The data is transferred using a two wire synchronous serial scheme, with the clock always controlled by the programmer. The ICSP signals are:


GND
Negative power input to the PIC and the zero volts reference for the remaining signals. Voltages of the other signals are implicitly with respect to GND.


Vdd
This is the positive power input to the PIC. Some programmers require this to be provided by the circuit (circuit must be at least partially powered up), some programmers expect to drive this line themselves and require the circuit to be off, while others can be configured either way (like the Microchip ICD2). The Embed Inc programmers expect to drive the Vdd line themselves and require the target circuit to be off during programming.


Vpp
Programming mode voltage. This must be connected to the MCLR pin, or the Vpp pin of the optional ICSP port available on some large-pincount PICs. To put the PIC into programming mode, this line must be in a specified range that varies from PIC to PIC. For 5V PICs, this is always some amount above Vdd, and can be as high as 13.5V. The 3.3V only PICs like the 18FJ, 24H, and 33F series use a special signature to enter programming mode and Vpp is a digital signal that is either at ground or Vdd. There is no one Vpp voltage that is within the valid Vpp range of all PICs. In fact, the minimum required Vpp level for some PICs can damage other PICs.


PGC
Clock line of the serial data interface. This line swings from GND to Vdd and is always driven by the programmer. Data is transferred on the falling edge.


PGD
Serial data line. The serial interface is bi-directional, so this line can be driven by either the programmer or the PIC depending on the current operation. In either case this line swings from GND to Vdd. A bit is transferred on the falling edge of PGC.

Is this the answer i've been looking for? So i just have to connect connect pgc and pgd on the pic and all the other ones?Will it work with ic-prog or winpic800?I mean that it is not in the availible hardwares, so i have to configure my db9 port?
 
Last edited:
The clone version needs a bootloader or something like that, so you need to program a pic, like the propic2 gold.

What are you talking about? The PICkit2 and compatibles should be preprogrammed by the seller. What's a propic2 (a parallel port progammer) got to do with a bootloader?
 
db9 is the name of my computer port...

That's the name of a socket type, not a port.

So *.o is the file that i have to send to ic-prog.

No, *.HEX is as I've said before.

Is this the answer i've been looking for? So i just have to connect connect pgc and pgd on the pic and all the other ones?Will it work with ic-prog or winpic800?I mean that it is not in the availible hardwares, so i have to configure my db9 port?

DB9 is a socket, not a port, it's one of the two socket types used for serial ports though - are you talking about a serial port?. If so you've been talking about parallel ports with D0-D5 and ACK, not serial port connections.
 
What are you talking about? The PICkit2 and compatibles should be preprogrammed by the seller. What's a propic2 (a parallel port progammer) got to do with a bootloader?

"Unfortunatly to start the clone(pickit2) you have to program the firmware into the 18f2550-you will need a secondary programmer...()...once the firmware has been programmed, you can upgrade it without the need of another programmer, because the firmware also includes a BOOTLOADER."

Are you talking about a serial port?

db9 serial port yes.

So *.o is the file that i have to send to ic-prog.


No, *.HEX is as I've said before /// No, MPASM generates it, it's the output file that your programmer software needs.

It's the only output file that i got... with .err and .lst.

OKAY... i am all mixed with the controversial facts that my father, you and internet provides me ( i dont say that you are wrong, i just dont know to look for what).

Maybe my paint schematic is very wrong, if it is, just tell me why.How can i configure ic-prog to work with this?

...This topic should'nt had got that big...

EDIT: i just seen that there is a pgm, what is it?
 

Attachments

  • pic programmer.JPG
    pic programmer.JPG
    30 KB · Views: 156
Last edited:
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top