My Journey into CPLD Programming

One thing I never learned in school was FPGA/CPLD programming. I have done a lot of projects with programming microcontrollers and writing PC applications but never done anything with FPGAs or CPLDs. From my research knowing VHDL seems to be pretty in-demand right now so I think I am going to try to teach myself VHDL. A while back I bought a Xilinx Coolrunner II CPLD starter kit and I think I am going to pull it out and use it to learn VHDL. Once I get the hang of the language I think I will do a project with a CPLD, right now I am thinking a stepper motor controller would be a fun project but maybe I’ll think of something else. This is the dev kit I bought:

Currently I’m downloading the massive 5.9GB Xilinx development software will post more about my journey into VHDL as I get farther.

Andrew

PCB Buisness Card

Thought I would work on a new project over the Canada Day long weekend for a change of pace. I am going to make a PCB business card as something that I could show off at a job interview and things like that. I’ve decided to do a little circuit with the Microchip PIC10F208. This is a really neat little microcontroller; it comes in a tiny SOT23-6 package, with 0.75KB flash 24 Bytes of RAM, 1 x 8 Bit Timer, 1 Comparator. The best part is it’s cheap only $0.78 on Digikey for 1 chip. I could easily use a bigger microcontroller but sometimes it’s fun to have the challenge of a very limited microcontroller like this. If this goes well I might try doing more projects with it.

The Circuit

Microchip has a app note on how to do make a Capacitive touch button using two pins on it so I am going to try that and have the microcontroller blink a couple LEDs when it detects a touch. The circuit is very simple; the capacitive touch part is just a schottky diode, resistor and the capacitive sensing pad, a battery and two LEDs. The microcontroller pins can sink/source 25mA so I can easily drive an LED from these. I’m powering the whole thing with a 20mm coin cell battery since the mircocontroller is going to be sleeping most of the time so it should last a really long time.

Software

I haven’t programmed in assembly for a long time but the software should be real simple it will sleep most of the time and wake up one and a while to check the capacitive touch button like every 500ms or so and if it detects a touch it will blink the LEDs for a few seconds if it doesn’t detect a touch it will go back to sleep.

The PCB

Here’s a picture of the layout. It has the battery in the top right corner. The microcontroller/LED circuit in the top middle, the capacitive touch button on the bottom right, my name and contact info on the middle and a QR code leading back to my website on the bottom left. I am going to have it done with black silkscreen since I think that will look really nice and made with 0.8mm FR4 to make it a little thinner than normal and more business card like.I haven’t priced it all out but including the PCB the total BOM cost should come to around $7 which isn’t too bad most of the cost is from the connector batty and battery clip. I could use an SMT battery to save some cost but I would like it to be replaceable.

I’m going to send the Gerber files off to iTead Studio today and should hopefully get my PCBs back in a few weeks. Once I’ll blog about it once I get something up and running.

Schematic Here

Andrew