Usb to serial converter for pic programmingHi.I have a pic programmer (pic 16f877a) with rs232 adaptor.I program the pic with the serial port of my pcand i want to make it usb but still programming it with serial way with low voltage programming (no bootloader)so i will connect the usb port to my pc and the output rs232 with the rs232 of my pic programmer.I think i need a usb to serial converter chip and a hex schmitt trigger inverter to be able to send hexfiles to pic.I want a schematic circuit to build it with rs232 output not TTL or something else.Thanks. GiorgosMvr i am writing with micro c, so i program the pic about every 5 mins sometimes.then for me, the only bearable options would be:1 to buy mikroProg for PIC programmer -2 Buy a development board with programmer on board, such asSerial port programmers are complete garbage IMHO. Adding a USB to serial adapter makes things far worse still.The only home-made PIC programmer possibly worth the bother is a PICkit2 clone, but this badly suited for mikroC pro use, and a bought one is far superior.I recommend that you go for option 1. Or else live with self-imposed torture if you really MUST build your own programmer, but don't come crying to me when you do.
![]()
You can then interact with your target using an ordinary terminal program. One key difference is that the signals are LVTTL (0 – 3.3V) or TTL (0 – 5V), while ordinary serial is -10V to +10V. So you can’t just use an ordinary USB-serial adapter, the kind used to connect an old PDA to your computer.
GiorgosMvrThanks for the answer but i want to make it with a schematic because i want to learn this circuit.It's not so difficult.If i buy everything i won't ever learn how it works and i don't think it will be cheaper from building it myself.The best you can do is to save your time and abandon the whole idea of using USB to serial converter. USB to serial converter works fine during plain UART communication, however not during programming PICs - you will have problems with the voltage and signal timings on RTS and DTR.AFAIK, MikroC do not support Microchip programmers/debuggers as they selling their own tools. If you do not want to spend money, you may create one of PICkit2 clones.PICkit2 is open (hardware and software) and easy to build, if you prefer to learn from it. And it supports the PIC family you working with (it lacks only support of new devices, which is discontinued in favor PICkit3 and other newline programmers/debuggers). You will have USB programmer (and much more features), which does not mean you are required to use 'bootloader' as you have mentioned - it is the feature of PIC itself, allowing updating firmware without any programmer used. Reducing some circuit parts from original schematic you may create very simple USB programmer only and use PICkit2 software with Automatic write function when HEX is changed or allow programming on pressing PICkit2 button:PICkit2 page with datasheets (Guide pdf includes schematic) and other files (firmware, programming application, sources, etc).
Next, connect the Serial cable to the breadboard. I use a 6-pin header on my board to make it easy to attach and detach the cable.
With the cable attached, the ATtiny is now powered up and running. The next step is to monitor the serial output.Open the Arduino IDE, select the COM port of your cable and open the Serial Monitor. Note that the Programmer option in the IDE needs to be set to AVRISP mkil for this to work.
If you are using a USBtinyISR to program your ATtiny85, just change it in the IDE when you have completed the programming step.
![]() Comments are closed.
|
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2023
Categories |