Connecting PIC18F to PC??? please..

Thread Starter

st98

Joined May 27, 2010
33
Hi,

I have a project using the PIC18F248. I am using a PIC PG1 programmer but I don't get to connect the development board PIC-P28 (OLIMEX) to the PC. I use MPLAB + Ccompiler software. How do I set it up to achieve connection and also do I use an external power supply (I do have one) or not? The connection between the board and the PC is made through a series USB to RS232 cable and the PIC PG1 programmer cable.

Thanks You
Stav
 
The PG1 is a JDM type programmer, it will not work with a USB to RS232 cable. You need a true RS232 port. That said it's also a very unreliable programmer even with a proper RS232 port.
 

Thread Starter

st98

Joined May 27, 2010
33
I suppose it would work with a true port then but which software could I use in that case? Are you saying it would be better if I buy an other programmer and if yes which one would you suggest?

Thanks You
Stav
 
Get a proper USB programmer, the PICkit2 or 3 or even my Junebug (PK2 compatible) are superior to any old serial / parallel device. They are also MPLAB compatible & have the debugger too (very handy)
 

Thread Starter

st98

Joined May 27, 2010
33
Thanks for your reply.It would be better for me to use the easiest one at that state, only thing I want to achieve is to connect it to the pc and programme it. Is that possible with picprog?
Thanks
Stav
 

CDRIVE

Joined Jul 1, 2008
2,219
The PG1 is a JDM type programmer, it will not work with a USB to RS232 cable. You need a true RS232 port. That said it's also a very unreliable programmer even with a proper RS232 port.
Just curious... why is that? What is a JDM type programmer?

The only difference between a true RS232 Port and a USB/Serial is the voltage levels. The USB/Serial converters can input true RS232 levels but they output only +5V -5V. The only other issue (I know of) is at the PC end, where the TX & RX buffers are handled by the PC's memory instead of a UART.

The only issue I've had with USB/Serial converters is during programming a Picaxe. This is because Picaxe uses the old "Break" command/signal during programming but not when running the program. I've tested a number of USB/Serial converters and only my old Belkin will not recognize 'Break'.

For sure I'm not challenging your statement. I'm just not familiar with JDM type programmers. ;)
 

debjit625

Joined Apr 17, 2010
790
I want to achieve is to connect it to the pc and programme it. Is that possible with picprog?
Yes

Just curious... why is that? What is a JDM type programmer?
JDM are programmers which have no external power supply they get their power from the serial port (RS232) ,many PIC needs a high voltage (well known as Vpp) for progarmming now these JDM type programmers use serial ports voltage level to make this high voltage,normally using the dual signal level of the RS232 this can be done but some RS232 chip use new standard of voltage level for power saving (like in laptops) which cause JDM programmers not to work properly as they cant make the high voltage from very low signal level.
 

CDRIVE

Joined Jul 1, 2008
2,219
Yes, the voltage standard for RS232 has changed over the years and it's quite a bit lower than the original standard. I think the original standard was near +-30V but is now +-12V. If the OP needs the higher voltage to only power the pic why can't he use a separate supply, or are you saying that his PIC needs higher than 5V for programming signals too?
 

t06afre

Joined May 11, 2009
5,934
Yes, the voltage standard for RS232 has changed over the years and it's quite a bit lower than the original standard. I think the original standard was near +-30V but is now +-12V. If the OP needs the higher voltage to only power the pic why can't he use a separate supply, or are you saying that his PIC needs higher than 5V for programming signals too?
I think the problems with "modern" serial ports are both voltage level, and current sourcing capabilities. I have also heard that a USB to serial converter can mess up the timing.
The funny thing is that if you start from scratch and want to build a JDM programmer. The price tag will be close to a new PICKIT.
Then the project are done:rolleyes:
 

CDRIVE

Joined Jul 1, 2008
2,219
I think the problems with "modern" serial ports are both voltage level, and current sourcing capabilities. I have also heard that a USB to serial converter can mess up the timing.
Looking at this link.. http://www.instructables.com/id/Simple-JDM-PIC-Programmer/ I would not opt for using the TX Data line to also power the
PIC. Personally, I would use the USB +5V supply and rout it over to the JDM. I would also think that scaling down the values of Rn in this circuit may be in order when using a converter. As for the converter not being capable of sourcing enough current ... My LoopBack tester has a Bi-color LED on each control and data pin. Three of the LEDS are lit at all times with moderate brilliance. Admittedly, not exactly an exacting limits test though. ;)
 

debjit625

Joined Apr 17, 2010
790
CDRIVE said:
If the OP needs the higher voltage to only power the pic why can't he use a separate supply, or are you saying that his PIC needs higher than 5V for programming signals too?
PIC is programmed using a high voltage (Vpp) which is in a range from 9V to 13V.Now these days PIC are also having a low voltage programming option which only need 5V for both power and programming,but thats another thing(Vpp is still needed for many case).Here whats important is that in these JDM type programmer a PIC will need high voltage 9 - 12 Volt with 5V for power to be programmed.Now external power supply solves the problem but we also have to rebuilt the circuit,you just cant give Vpp to mcu to be programmed, it is a kind of switching signal which is given at proper time in programming time line.

Many new standard for serial port gives a +/-3V range for signals.;)

t06afre said:
I think the problems with "modern" serial ports are both voltage level, and current sourcing capabilities. I have also heard that a USB to serial converter can mess up the timing
Current sourcing capabilities of new standard serial port is not much to worry about as PIC are CMOS device and they really sink and source very small amount of current at program time.:)
 
Top