From RepRap
Revision as of 12:59, 7 July 2014 by Traumflug (talk | contribs) (Fix link.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Hardwired Serial Ports

The RepRap itself can run off any RS232 serial port, but the JDM PIC Programmer needs a hardwired serial port - basically, not a USB serial port. How so, I hear you ask?

Well, in days gone by the USB port had not been invented and modems were big, pug-ugly boxes that lived outside your PC and connected you to the outside world with a staggering 1.2Kbit/s. To connect this thing to your computer (not a PC - they'd not been invented yet), you used the same interface that banks used to connect up the terminals - RS232. When PCs came along, they wanted to connect as terminals too, and wanted to use modems. So they had RS232 ports On a plug-in card. Someone invented the mouse, so they needed two plugs. Chips merged, providing two standard serial ports, and these spread into 386 PCs Pentiums, and now ... now nobody uses them much. Chips are cheap, boxes and connectors are expensive. So, there are fewer manufacturers sticking RS232 connectors in their boxes these days.

When you have one in your PC's box, you can dicker with the control lines in computer-space. For one on a USB, the serial port's USB controller runs a little network. Your PC doesn't have absolute say over how the serial port works anymore and the USB gizmo handles the control lines as it sees fit.

A common dodge used to be to use the signal lines - not the data line - of a serial port connector to make electronic add-ons do their stuff. So it is with our PIC programmer. So if you don't have direct control over the serial port, the PIC programmer isn't going to be able to do its stuff.

You're not beat yet. Pay enough money and you can buy a PIC programmer that works through the USB port. Probably not under Linux though - correct me if I'm wrong, it is a Wiki after all.

Pay out slightly less money and you can buy PCI cards that plug in to a PC and give it serial ports - tough on laptop owners though. One word of advice: Don't expect logical number ing of the ports. A Linux PC will probably have the first two serial ports as /dev/ttyS0 and /dev/ttyS1. But a plug in PCI card, such as the one kindly provided for me through donations from our generous sponsors, may start its serial ports at /dev/ttyS14 and /dev/ttyS15. Once you've booted your PC, check the output of the dmsg command and look for likely suspects.

For free, you can use an old computer, which probably has a working serial port on it.

Or, you could do the work to make a USB serial PIC Programmer work under Java, which Simon and I would probably be quite greatful for. Oh, a whole bunch of Laptop and Mac users would probably like it too.

Finally, you can support this project with a donation, so we can do more of the research necessary to develop the RepRap:

<div class="thumb tright">

-- Main.VikOlliver - 07 May 2006

programming PIC over USB

  • "the PICkit2 ... USB, integrates with MPLab, does in-circuit debugging, ... and both the design and firmware are open source so you can build your own or integrate one for debugging into your own board designs." (has links to Windows, Linux, and Mac OS X Software and source code). Other open-source projects based on pickit2: [1], [2], [3]
  • pickit-devel mailing list: Discussion of open-source software development for Microchip's PICKit series of programmers.
  • "Bus Pirate PIC Programmer": uses a Bus Pirate connected with a USB cable to a PC to program a PIC
  • "Ubuntu-compatible PIC microcontroller system"
  • Rob Hamerling briefly mentions porting the open-source pickit2 PC software to run under another PC operating sytem

programming AVR over USB

As of 2011-02, all the current RepRap Options use Arduino, which is designed to be reprogrammed over USB, and has cross-platform development tools.

  • "PICKit2 AVRISP": Programming AVR microcontrollers with the PICKit2 programmer (USB)
  • "USBtinyISP": "a simple open-source USB AVR programmer and SPI interface. It is low cost, easy to make, works great with avrdude, is AVRStudio-compatible and tested under Windows, Linux and MacOS X."
  • "Using an Arduino as an AVR ISP (In-System Programmer)" using USB and ArduinoISP
  • "MegaISP" makes an Arduino (with the standard USB connection to a PC) function as an AVR-ISP programmer, so it can (among other things) program blank or bricked Atmel AVR chips with the standard Arduino bootloader.

other PIC utilities that run on Linux

  • libusb: a library to enable user space application programs to communicate with USB devices. (Originally written for Linux; now also supports Mac OS X and Windows) (This is for the PC side of the system)
  • picusb: USB Resources for Microchip Microcontrollers (this is for the microcontroller side of the system)
  • "Jolt PIC18F Bootloader": Once this bootloader firmware is installed on a PIC18F chip, and the bootloader application (written in Java) is installed on your PC, you can use it to re-program new applications into the chip. (Does the data go directly over the USB cable into the PIC USB interface, or does the data go over the USB cable, through a FTDI adapter, and then into the PIC UART interface?)