Westford MicroSystems

Westford, Vermont, USA

Projects using Microchip PICmicro® MCUs
written in and featuring CCS C code

Last modified 10/07/2014



"But when the kindness and love of God our Savior appeared, he saved us, not because of righteous things we had done, but because of his mercy. He saved us through the washing of rebirth and renewal by the Holy Spirit, whom he poured out on us generously through Jesus Christ our Savior."     Titus 3:4-6

Soli Deo Gloria!                   About me



.... PIC® Software ....
CCS PIC C Compilers are used to compile my source code. Liberal use is made of the many built-in functions provided by these compilers. One statement in C can generate pages of PIC® RISC instructions... instructions you don't have to write by hand! CCS still only charges $125 for their 12-bit and 14-bit command line compilers for Windows and Linux, and offers Windows IDE software as well. These are well worth it in my opinion. You may order the compilers directly from their web site. (CCS also offers engineering and consulting services, their own line of cellular protocol analyzers, and more.) The CCS User Forum is an excellent source of advice for using the C language and compiler with PIC® MCUs. It also has a growing code library.


.... PIC® Devices
....

Microchip makes the PICmicro® microcontrollers. Databooks, application, notes, and much more are on their web site. Everything is oriented around the PIC's RISC assembly language, of course. Visit microchipDIRECT to buy PICmicro® devices directly from Microchip Corporation. This is intended both for personal and business orders.


.... PIC® Device Programmer
....

microEngineering Labs makes the U2 Programmer that I used to program PICs. It connects to a USB port and gets it's power from the USB port. microEngineering Labs also specializes in development tools that make working with PICmicro® MCUs quicker and easier. For those who prefer to program in BASIC instead of C, they offer BASIC compiler software, as well as a wide range of other products such as serial-port and parallel-port device programmers, experimenter and prototyping boards, books, and more. These folks are quite responsive and helpful.


.... Electronic Components
....

Digikey has everything, plus everything else! Ordering via web is easy. (I remember when their first catalogs were 1/8" thick... one of the list printed catalogs measured more than 3" thick! They don't even print a catalog any more.)

Mouser is also a very thick catalog! Ordering via web is easy.

Farnell element14 is the leading multi-channel, high service distributor of electronic components supporting millions of engineers and purchasing professionals throughout Europe and Asia, and is a global distributor of Microchip products including microcontrollers, semiconductors, and more. Farnell values alignment with like mind people who think Farnells services could be of benefit.

Crystalfontz supplies a wide variety of LCD displays for very reasonable prices. Although my projects use only the character-based LCD displays, they have much more.

Saelig searches the world to bring you unique, easy-to-use control and instrumentation products. "SAELIG" is an Olde English word meaning "happy, prosperous, and blessed"...which is what Saelig wishes for its customers! Very reasonably priced oscilloscopes as well as a very broad line of everything else.

Spark Fun Electronics A great source for innovative prototyping supplies including the CP2102 USB-SERIAL and other breakout boards for attractive prices. Their web site includes User Forums and (future) tutorials. I browse this site to find out what's latest.

Saleae makes several logic analyzers: Logic is an 8-bit analyzer for a low price and Logic16 is a newer 16-bit analyzer. I have both. They recently introduced a new breed of analyzer that includes analog capability. The best part about these analyzers is the obvious care put into the design of both software and hardware, and very responsive and helpful emails. Software is updated as necessary. These are well worth the price and I use the analyzers often.


.... Printed Circuit Boards
....

ExpressPCB provides printed circuit board prototyping and production service. Their free ExpressSCH schematic editor and ExpressPCB board layout CAD software run under Windows and are easy to learn, complete with integrated Digikey part numbers. After the finished board file is uploaded through the software, their PC board service manufactures high quality boards with plated-through holes, from double-sided to four layers, up to 12"x14" in size. They are both fast and economical with most orders shipped the next business day, and for as little as $51 U.S. I used this process to make PC boards for my Tank Level Detector and NiCd/NiMH Battery Characterizer.

Advanced Circuits provides printed circuit board fabrication for prototyping or production. They also have assembly services. Check out the Products/Services menu for their very affordable board fabrication specials. Input is standard Gerber (and more) if you already have PCB layout software such as Altium Designer and many other good software packages that all have cost. (They provide free PCB layout software if you don't.) I've been doing business with this company for seven years.



.... Mechanical Hardware
....

eMachineShop is a full-service machine shop as near as the internet. It's great for making custom parts for research projects. Download their free software to draw your part after which you can display it in 3D. Essentially, you send out a file; you get back physical parts that work to your specs. The software includes commands to evaluate your design, obtain automated price quotes, and order via internet. eMachineShop streamlines the entire process from what you see on your screen to delivery at your door.

Online Metals is an online supplier of small quantities of metal such as steel, stainless, copper, bronze, brass, titanium (and even plastic) in tube, flat, angle, square, hex, round, flat, sheet, and other shapes. No minimum order!

McMaster-Carr has what I believe may be the most helpful and intuitive web presence online today. Their site makes it easy to quickly locate a part, locate helpful alternatives to the part, and narrow down exactly what you need. After you set up your profile, a few clicks enters an order and parts are on their way. Pretty impressive! So what does McMaster-Carr sell? Screws, bolts, and all fasteners, pipe, tubing hose, fittings, bearings, pneumatics, sealing components, and so on.



.... My favorite surplus stores
....

HSC Supply (Halted Supply) in the San Jose, CA area is located at 3500 Ryder Street, Santa Clara, California 95051, 408-732-1573. You can view their "Tour Our Store" PowerPoint to get an idea of their store, but the one thing inaccurate about the presentation is that they obviously cleaned the place up before taking the photos! It's really much more cluttered, therefore better, than the photos!

Excess Solutions in the San Jose, CA area is located at 430 E Brokaw Road, San Jose, CA 95112, 408-573-7045, 15 minutes from Halted Supply (above.) Mostly electronic components. (Check out the Frys Electronics one block down Brokaw Road from Excess Solutions.)

Skycraft Surplus in the Orlando area. In Orlando, only minutes from the Orlando Airport! I couldn't believe what they had. It was crowded (with people and stuff.)

P&T Surplus, 198 Abeel Street, Kingston, N.Y. 12401, 845-338-6191. Surplus metals, electronics, hardware, and other materials bought and sold. They are beginning to have a presence on eBay. Abeel Street is at the north end of the old bridge over the Esopus Creek. Turn west (inland) and go three blocks, on the left. Mostly industrial and mechanical surplus.

From looooong ago...ACME Electronics Liquidators, Minneapolis, MN. As a kid in the 1960s I would ask my grandfathers to drive me to ACME Electronics on Hennepin Avenue. I couldn't get enough of this place. I understand it has become Electronic Center, 6020 Highway 55, Golden Valley, MN. The next time I'm in the Minneapolis area I'll check this place out.

And lastly, are there any electronic surplus stores in Vermont? Absolutely none!


...... Questions
......

  • CCS website
  • CCS User Forum
  • Microchip Corporation website
  • About the LCD DISPLAYS used in most of these projects
  • Basic hints and direction to get started with PICs
  • Ideas for students looking for a term project
  • If you are really searching in life
  • Where are the hex files? I don't publish them.


  • ...... Projects
    ......




    NOTE: All material Westford MicroSystems® 2000-2014 and may not be republished without permission. Links to these pages are always appreciated.

    NOTE: Although these projects work for me, they are offered as-is, at-your-own-risk, and are for non-commercial use only. They are ideas, not products. (Commercial users please contact me if interested.)

    NOTE: Some of these projects involve voltages that can kill. It is assumed that if you are knowledgeable enough to experiment, you are also aware of the risks.

    NOTE: EMI/RFI that is sprayed by these circuits is dependent on both electrical design and mechanical construction. Use careful layout technique where EMI/RFI is critical to the application, such as in radio-controlled airplane and marine navigation applications!




    PROJECT Processor Files
      INCLUDE FILE "jonsinc.h" used by most of these projects. All Description
    Download
          WIRELESS REMOTE CONTROL for Raymarine ST4000 Autopilot uses Raytheon's Seatalk® communications protocol. 16F628 Description

    Transmitter
    C code
    Schematic

    Receiver
    C code
    Schematic

      COMBINATION LOCK FOR SAFE puts security into an old fire safe. 16F628 Description
    C code
    Schematic
      TIMED DISCHARGE ADAPTER for a Vericom control panel used with an Advantex wastewater treatment system. 16F628 Description
    C code
    Schematic
      COFFEE POWER MANAGER or, how to get 27-amps out of a 20-amp outlet for three large coffee pots at church. 16F628 Description
    C code
    Schematic
      STEAM GENERATOR for residential steam shower. 16F873 Description
    C code
    Schematic (CPU)
    Schematic (Unit)
      NETWORK EQUIPMENT RESETTER automatically drops power to routers and satellite internet receiver once every 24 hours. 16F628 Description
    C code
    Schematic
      DATA LOGGER measures and stores voltage at specified intervals and dumps to RS232. 8192 samples. 16F876 Description
    C code
    Schematic
      BATTERY CHARACTERIZER loads charged NiCad and NiMH battery packs and measures milliamp hour capacity. 18F252 Description
    C code
    Schematic
      Underground locator generator for Radiodetection® RD400 LLTS Precision Line Trace unit (underground cable locator) 16F628 Description
    C code
    Schematic
      GPS REPEATER/SYSTEMS MONITOR displays NMEA-0183 data from a GPS, battery voltages, etc. 16F876 Description
    C code
    Schematic
      TRACK CONTROLLER FOR AWANA® GRAND PRIX (also Pinewood Derby) measures and displays finish times, sends results to computer. Works with "GrandPrix Race Manager" from GrandPrix Software Central. 16F628 Description

    C code

    Schematic
      PIC® PROGRAMMER
    I use the microEngineering Labs U2 Programmer in my own lab. This programmer connects to a USB port and gets it power from the USB port. It works well and I highly recommend it!
    All! Description
      GPS-based COMPASS DISPLAY uses RS232 data stream from GPS receiver. 16F628 Description

    C code

    Schematic
      DARKROOM EXPOSURE SYSTEM controls safelamp and enlarger lamp, measures exposure. 16F873
    16F876
    Description

    C code

    Schematic
           REMOTE CONTROL for Raymarine ST4000 Autopilot uses Raytheon's Seatalk® communications protocol. 16F628 Description

    Discrete switch version
    C code
    SchematicF628

    Keypad version (untested!)
    C code
    SchematicF628
      COMBINATION LOCK for home door, 4x4 matrix keyboard, master combination plus four programmable combinations, programmable lamp and solenoid times 16F84 Description
    C code
    Schematic
          LIQUID LEVEL TRANSMITTER/RECEIVER SYSTEM designed for marine applications using Raytheon's Seatalk® bus. Includes tachometer transmitter example although the receiver is only for liquid level. 16F628 Description

    Level Transmitter
    C code
    Schematic

    Tach Transmitter
    C code
    Schematic

    Level Receiver
    C code
    Schematic
      TEMPERATURE SENSOR using the DS1820 chip. 16F876 Description
    C code
      Experimental PELLET STOVE CONTROLLER. 16F628 Description
    C code
    Schematic
      DIESEL TACHOMETER uses "tach" signal from alternator. 16F628 Description
    C code
    Schematic
      ADC EXAMPLE for 16F87x PICs and similar. 16F873
    16F876
    Description
    C code
      ADDRESSABLE ADC and controller receives serial command then 1) returns ADC measurement, and 2) writes output port. Three-byte serial command, three ADC inputs, 8 digital outputs, 5-bit address, 9600-baud. 16F873 Description
    C code
    Schematic
      MORSE CODE DISPLAY hears Morse code from shortwave receiver, displays text on LCD display. 16F84 Description
    C code
    Schematic
      Rx/Tx pulse stretcher for LED that monitor serial Rx/Tx lines 12C509 Description
    C code
      COMBINATION LOCK single button, for car liftgate 12C509 Description
    C code
    Schematic
      DELAYED-SHUTTER CONTROL for the (now obsolete) Kodak DC-20 digital camera 12C509 Description
    C code
    Schematic
      CAMERA INTERFACE for the (now obsolete) Kodak DC-20 camera in radio-control aircraft 12C509
    16F84
    Description

    509 version
    C code
    Schematic

    F84 version
    C code
    Schematic
      AUDIBLE EMERGENCY LOCATOR ALARM ("lost model alarm") for lost (and possibly "re-kitted") radio-control planes 12C509 Description
    C code
    Schematic
      Radio-control SERVO EXAMPLES 16F84 Description

    Straight function
    C code

    With linearizing function
    C code








    ©2014 Westford MicroSystems. All rights reserved.