Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 30th June 2005, 12:07 PM   (permalink)
Experienced Member
YAN-1 has a little shameless behaviour in the past
Default Frustration

I have started reading about ways of PIC programming just a short while ago but I think I am a little lost. Now the way I see it, there is something called in-circuit programming. So if I am interested in sending the PICs new programs WHILE THEY ARE ALREADY PLACED IN THEIR EMBEDDED SYSTEM, I can send the new hex file serially by controlling the RB6, RB7, and master clear pins? How do I do that or how do I control the sequence of voltages on these pins because I read a tutorial and it said that when the PIC is being programmed, the master clear is set to low and then quickly to 12 volts and so on. How do I manage that sequence? And when do I need a boot loader?! Do I need it for in-circuit programming or for just programming the PIC in a certain circuit without a programmer and then placing the PIC in its circuit? I know these are lots of questions but I got really confused and I would appreciate your help.
__________________
World.......behold........YAN is coming
YAN-1 is offline   Reply With Quote
Old 30th June 2005, 12:26 PM   (permalink)
Super Moderator
 
Jay.slovak is just really niceJay.slovak is just really niceJay.slovak is just really nice
Default Re: Frustration

Quote:
Originally Posted by YAN-1
I have started reading about ways of PIC programming just a short while ago but I think I am a little lost. Now the way I see it, there is something called in-circuit programming. So if I am interested in sending the PICs new programs WHILE THEY ARE ALREADY PLACED IN THEIR EMBEDDED SYSTEM, I can send the new hex file serially by controlling the RB6, RB7, and master clear pins? How do I do that or how do I control the sequence of voltages on these pins because I read a tutorial and it said that when the PIC is being programmed, the master clear is set to low and then quickly to 12 volts and so on. How do I manage that sequence? And when do I need a boot loader?! Do I need it for in-circuit programming or for just programming the PIC in a certain circuit without a programmer and then placing the PIC in its circuit? I know these are lots of questions but I got really confused and I would appreciate your help.
In-circuit programming (ICSP) is very usefull feature. It allows you to program PIC easily in circuit (as you said), by controlling RB7, RB6, MCLR (+GND and maybe VDD). You only need to know the sequence of activation if you made your own programmer! (I mean totally new design). If you build let's say JDM, then there is no reason to learn how it works, you just plug it in and press program button.

Bootloader is a way of programming PIC, when there is a small program inside PIC, that is "listening" until it's called (usually it listens shortly after RESET) and if it finds out there is a demand for programming it enters program mode and programs the PIC with Data comming into PIC usually from serial port. If bootloader did not detect request to enter program mode, it runs main program as usual.

Check out my Sig for more info about Tiny PIC bootloader!
__________________
"I share, thus I am"
Jay.slovak
Read this!
ICD2 Clone
Best PIC/DsPIC Bootloader

Read my Inchworm ICD2 review!
Jay.slovak is offline   Reply With Quote
Old 30th June 2005, 12:26 PM   (permalink)
Experienced Member
 
Someone Electro is on a distinguished road
Send a message via AIM to Someone Electro Send a message via MSN to Someone Electro Send a message via Yahoo to Someone Electro
Default

All modern PIC only have ICSP (In Circuit Serial Programing)The programers that you put the PIC in use ICSP And yes you can program it wen its in the circuit IF the circuit is built that way.

You need to aply 13V to MCRL to get it in programing mode.wile providing the 5V suply.Then the PIC comunicates serialy whith the PC (one pin is the clock and the other is data)
__________________
Il give you shocking experience.
Someone Electro is offline   Reply With Quote
Old 30th June 2005, 12:28 PM   (permalink)
Experienced Member
 
Someone Electro is on a distinguished road
Send a message via AIM to Someone Electro Send a message via MSN to Someone Electro Send a message via Yahoo to Someone Electro
Default

jay you ware just a cuple of seconds faster than me! (check the time stamp on top of the posts)
__________________
Il give you shocking experience.
Someone Electro is offline   Reply With Quote
Old 30th June 2005, 12:32 PM   (permalink)
Super Moderator
 
Jay.slovak is just really niceJay.slovak is just really niceJay.slovak is just really nice
Default

Quote:
Originally Posted by Someone Electro
jay you ware just a cuple of seconds faster than me! (check the time stamp on top of the posts)
Yeah, it was like >1 second :lol:
__________________
"I share, thus I am"
Jay.slovak
Read this!
ICD2 Clone
Best PIC/DsPIC Bootloader

Read my Inchworm ICD2 review!
Jay.slovak is offline   Reply With Quote
Old 30th June 2005, 12:34 PM   (permalink)
Experienced Member
 
Someone Electro is on a distinguished road
Send a message via AIM to Someone Electro Send a message via MSN to Someone Electro Send a message via Yahoo to Someone Electro
Default

Why didnt you write some more so i cod be first
__________________
Il give you shocking experience.
Someone Electro is offline   Reply With Quote
Old 30th June 2005, 12:35 PM   (permalink)
Super Moderator
 
Jay.slovak is just really niceJay.slovak is just really niceJay.slovak is just really nice
Default

Quote:
Originally Posted by Someone Electro
Why didnt you write some more so i cod be first
LOL I want to be first :lol: .
__________________
"I share, thus I am"
Jay.slovak
Read this!
ICD2 Clone
Best PIC/DsPIC Bootloader

Read my Inchworm ICD2 review!
Jay.slovak is offline   Reply With Quote
Old 30th June 2005, 12:48 PM   (permalink)
Experienced Member
YAN-1 has a little shameless behaviour in the past
Default

I see. But for my project (a pentium 4 on a mother board is communicating with PICs), I am interested in sending and receiving data serially between the PICs and the CPU. Now this has to be done by connecting the serial cable to the RX and TX pins of the PIC, right? And I am ALSO interested in allowing the CPU to send the PICs new programs during their operation (ICSP). So in order to do this, I have to connect the serial cable to the RB6, RB7, and master clear pins?! So do I need two serial ports or what? And when programming the PICs, I just send the .HEX file serially to the RB7 pin?
__________________
World.......behold........YAN is coming
YAN-1 is offline   Reply With Quote
Old 30th June 2005, 12:54 PM   (permalink)
Super Moderator
 
Jay.slovak is just really niceJay.slovak is just really niceJay.slovak is just really nice
Default

Quote:
Originally Posted by YAN-1
I see. But for my project (a pentium 4 on a mother board is communicating with PICs), I am interested in sending and receiving data serially between the PICs and the CPU. Now this has to be done by connecting the serial cable to the RX and TX pins of the PIC, right? And I am ALSO interested in allowing the CPU to send the PICs new programs during their operation (ICSP). So in order to do this, I have to connect the serial cable to the RB6, RB7, and master clear pins?! So do I need two serial ports or what? And when programming the PICs, I just send the .HEX file serially to the RB7 pin?
You are a little confused with this...

For PIC to communicate with PC you need MAX232 level shifter (yes PICs TX and RX PINs). With that IC you can easily send bytes from and to PIC. ICSP is a type of programming when PIC is NOT running and is programmed by RB6/7 PINs (by IC-prog SW and JDM HW). If you want to "upgrade the program" in PIC via Serial, you will need bootloader...
__________________
"I share, thus I am"
Jay.slovak
Read this!
ICD2 Clone
Best PIC/DsPIC Bootloader

Read my Inchworm ICD2 review!
Jay.slovak is offline   Reply With Quote
Old 30th June 2005, 01:07 PM   (permalink)
Experienced Member
YAN-1 has a little shameless behaviour in the past
Default

Yeah I know that I need the MAX level shifter. But I am confused about the ICSP part. In my project, I need the PICs to be blank at first and then the pentium sends them their programs. So for that, I need a JDM programmer, right? And if the CPU has to send the PICs new programs ('update' their programs)over and over, it has to send the PICs the boot loader the first time as well? (of course, I don't know what a JDM is ops: ). And this JDM will take care of the required voltage sequences of the master clear, RB6, and RB7 pins, right? and it is connected via the serial port to the CPU, right?
I will be extremely grateful is you gave me a 'yes' or a 'no' for each of these questions with a short explanation in case of the 'no'.
__________________
World.......behold........YAN is coming
YAN-1 is offline   Reply With Quote
Old 30th June 2005, 01:19 PM   (permalink)
Experienced Member
 
Someone Electro is on a distinguished road
Send a message via AIM to Someone Electro Send a message via MSN to Someone Electro Send a message via Yahoo to Someone Electro
Default

JDM is a name of a programer and its powerd by the serial port (no external pover neded)

The programer is realy simple all it dose is thruns on/off Vpp,Vdd and sends/recives data from the PC and PIC

An programer can be made out of 2 transostors and a cuple of resistors.

An programer can be on the LPT port too or even the USB but USB is a prety complicated interface
__________________
Il give you shocking experience.
Someone Electro is offline   Reply With Quote
Old 30th June 2005, 01:20 PM   (permalink)
Experienced Member
 
Someone Electro is on a distinguished road
Send a message via AIM to Someone Electro Send a message via MSN to Someone Electro Send a message via Yahoo to Someone Electro
Default

ha now im the first. :twisted:
__________________
Il give you shocking experience.
Someone Electro is offline   Reply With Quote
Old 30th June 2005, 01:21 PM   (permalink)
Super Moderator
 
Jay.slovak is just really niceJay.slovak is just really niceJay.slovak is just really nice
Default

Quote:
Originally Posted by YAN-1
Yeah I know that I need the MAX level shifter. But I am confused about the ICSP part. In my project, I need the PICs to be blank at first and then the pentium sends them their programs. So for that, I need a JDM programmer, right? And if the CPU has to send the PICs new programs ('update' their programs)over and over, it has to send the PICs the boot loader the first time as well? (of course, I don't know what a JDM is ops: ). And this JDM will take care of the required voltage sequences of the master clear, RB6, and RB7 pins, right? and it is connected via the serial port to the CPU, right?
I will be extremely grateful is you gave me a 'yes' or a 'no' for each of these questions with a short explanation in case of the 'no'.
ok...
Yes, you need JDM programmer to program blank PICs. JDM (read my sticky) is a serial based programmer that takes care of all voltage levels and timings and with co-operation of Ic-prog programs the PIC. If you want to update programs via serial (using bootloader), yes you have to program bootloader routine first (JDM+Ic-prog) and then you can update programs with regular serial connection.

SO:
ICSP= used to program PICs while they are incircuit with cooperation of special HW (JDM is using serial port). It is used to program blank PICs

Bootloader= smal piece of SW that is programmed in PIC and connected to PC via standart serial connection (you also have to run Bootloader PC program). Usefull for updating programs if you can't access PCB and is saving RB6/7 pins of PIC.
__________________
"I share, thus I am"
Jay.slovak
Read this!
ICD2 Clone
Best PIC/DsPIC Bootloader

Read my Inchworm ICD2 review!
Jay.slovak is offline   Reply With Quote
Old 30th June 2005, 01:22 PM   (permalink)
Super Moderator
 
Jay.slovak is just really niceJay.slovak is just really niceJay.slovak is just really nice
Default

Quote:
Originally Posted by Someone Electro
ha now im the first. :twisted:
Mine is better :twisted:
__________________
"I share, thus I am"
Jay.slovak
Read this!
ICD2 Clone
Best PIC/DsPIC Bootloader

Read my Inchworm ICD2 review!
Jay.slovak is offline   Reply With Quote
Old 30th June 2005, 01:26 PM   (permalink)
Experienced Member
YAN-1 has a little shameless behaviour in the past
Default

Ok thanks. I would just appreciate it if someone answers my questions. I just came up with another one (don't hate me). Please keep in mind that the pentium 4 will be running linux and that i am not sure how the ICSP will be done now because Jay said i need a programming SW besides the JDM. I thought I will just have the pentium send the PICs the .hex files serially when it is doing ICSP.
__________________
World.......behold........YAN is coming
YAN-1 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes




All times are GMT. The time now is 02:32 AM.


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