PIC16C745/765: microcontrollers with USB

Fun devices of the month: Microchip's PIC16C745 and PIC16C765. As well as the usual microcontroller features, these require only a couple of external components to function as low-speed USB peripherals.

It is getting very easy to put together small but sophisticated electronic doodads using microcontrollers. Twelve years ago, I built some custom hardware using a 4-bit National Semiconductor COP401 microcontroller: it was simpler than the Z80-based systems I had built in the 80s, but it still involved a separate EEPROM for the code and I had to write my own assembler in order to code for the device.

Recently, I've been looking into building a more modern version of that old COP-based system, and potentially upgrading the functionality so that the new system can be hosted by a standard PC rather than having its own display built in. Rather than get into parallel port interfacing (so last century) I'm considering making the new system a USB device.

My current best finds for this function are two microcontrollers from Microchip, the PIC16C745 and PIC16C765. The smaller PIC16C745 even comes in an easy-to-use skinny DIP package so I don't need to worry about getting into surface mount manufacturing.

Just to drive the point home, here is what you get in a PIC16C745:

  • an 8-bit data path
  • 256 bytes of RAM
  • 8K instructions worth of non-volatile code memory
  • three timers, not counting the ones for watchdog and power brownout detection
  • two capture/compare/PWM blocks
  • a USART
  • 5 channels of 8-bit DAC
  • a low-speed (1.5Mb/s) USB interface
  • a clock generator with a PLL so that you can run the whole thing at an internal 24MHz rate from a 6MHz crystal
  • 22 I/O pins

All of the above comes to you for a cost of less than £5.00 in singles; much less if you can buy even a couple of dozen at a time.

You can see that a device like this looks like it would make designing a simple HID (Human Interface Device) class peripheral like a control box or a display very simple. I might write up some more details if and when I manage to do that.

I do have two minor quibbles about these devices, which probably result from their coming onto the market a couple of years ago and therefore not using Microchip's latest technology. The first is that the devices use EPROM memory for code rather than FLASH as with most of Microchip's other current parts. This means that the plastic-packaged production units are one-time programmable rather than reprogrammable, and also that development has to be done with a "windowed" ceramic package device, which you re-use by erasing using a high-intensity UV lamp. Fortunately, I still have one of those left over from from my mid-80s Z80 days...

The second quibble is probably related to the first in terms of the underlying technology: most other current Microchip parts have a small chunk of EEPROM you can use to save things over power cycles; these parts don't. That's wouldn't be a big deal for my intended application were it not for the possibility of using EEPROM to ameliorate the "program once" nature of the devices.

Even with the quibbles, these chips look like they'll be really useful.

[Later post on this subject: My Very First USB Peripheral.]

[Last updated: 22-Aug-2003.]

Tags:

Comments

hi Ian

just starting to think about using usb with my guys at work. Have been using PICs and RS232 for a few years so the PIC side (i hope) will not be to difficult. I will also have to get modern with VB i suppose. Have been using turbo basic for as long as it has been around to run my control functions. Yes, i know C is supposed to be better but I did a year with it and then drifted back to basic. Lazy i guess, as it's always easier with something you know.

I must look again at the microchip website to see if they have any 'F' series PICs with USB.
We use a lot of 16f872/874s in our projects.

look forward to anything you can do.

All the best

Alun O.

Hi Alun,

Thanks for your comment. I've added a link to a later article I posted on the same subject; you may find it of interest.

Microchip don't have any FLASH/EEPROM USB devices at present, nor do they seem to have any new USB devices announced at least for the short term.

Cheers,

-- Ian

hi
i will link pic16c765 to pc.but idont undrestand
how can pc detect usb port by windows program?
in fact,what is enumeration process by host?
best regard

i need help can u
I have built a usb devise and want to
have my own usb design so i can sell it on the open market... could you do this for me?...
IT HAS 17 MOMENTERY BUTTONS that i will assing in a flight simulator

What kind of board are you using there and where can I get one like that?

Hi,
I am planning to develop a USB based RF Transciever with microchip.Can you help me please.
Thanks in advance.
Mohandas P Vasudevan

Hi,
Do you know of any pic I can use that will input an output audio using usb but not the PIC16C745 and PIC16C765.I try them and they are for Hid(human interface divices).

Zweli, The appropriate page on the Microchip site is here. You can see there that these chips are (still) the only ones that Microchip sell with USB capability. Although they have future plans in the PIC18 series which might meet your needs, they still list them as "future product".

hi,
i want to do a project in connecting my system with another system ie peer to peer connection using usb. please help me in this project

Hola:
Mi proyecto se llama "Monitoreo para el consumo de lineas de abonado" Deseo utilizar un PIC que tenga salida a USB con memoria Flash, solo tengo la referencia del 16C745/65. Cual me podria aconsejar?
Quedo atenta a su respuesta gracias
LILIANA TORRES

Hi,

is there anywhere anybody knows of where I can send a 16c745 with accompanying code to be programmed?

I have just burned out the one in my pcb. It's removable, so I can get another to put in, but I don't have any equipment to burn the program into the PIC.

Is there a kind amateur out there who would help me?

Cheers,

Fatcharlie.....

email me on fatcharlieATbtopenworld.com