• Blog
  • Parts Sources
  • Form Test
VccGnd

Minimal PIC18F45K50 Breadboarded

1/29/2014

6 Comments

 
I breadboarded a minimal PIC18F45K50 circuit.  The LED in the circuit was added to so I can test a minimal "blink the LED" app.  This minimal circuit does not yet include the USB connector, nor powering via the USB bus.  However, it does interface properly to the PICkit 3 programmer (via the 6-pin male header to lower left of IC, rows 21-26 of breadboard), and I was able to blink the LED and set up breakpoints from the MPLAB X IDE.

In case you're wondering how the LED manages to be on despite there being no power applied, it's actually off.  What you're seeing is the camera's flash being reflected!
Picture
Added 2/25/2014: In response to comment from hoylegj, here is a zip file of the source.  Really just a few lines in main.c, plus changing the default auto-generated configuration settings in configuration_bits.c to use the internal oscillator.
blink18f45k50.x.zip
File Size: 21 kb
File Type: zip
Download File

6 Comments

PICkit 3

1/29/2014

0 Comments

 
The Microchip Crystal-Free USB PICs require the PICkit3 for programming.  It's not cheap (compared to TI LaunchPad), but Crystal-Free USB is very compelling, so I got one.
0 Comments

Crystal-Free USB PICs

1/29/2014

0 Comments

 
As mentioned in a prior post, the MSP430 series microcontrollers do not support 5V operation.  This made me look for some other low end microcontroller that does, one that I can use for generic projects.

I never thought I would look at the 8-bit PICs (I am definitely looking at PIC32's for other purposes though PIC32's do not support 5V either; also looking at Cortext M0's from various other vendors).  However, I stumbled upon some literature that Microchip now has a line of USB-capable PICs that do not require crystals.  They accomplish this by tuning the internal clock of each chip, then additionally syncing this clock at runtime to the SOF (Start of Frame) packets sent by the USB host.

The idea of being able to experiment with simple USB circuits without needing a crystal was very attractive so I started looking at this line of PICs.  As a bonus, they are available as DIPs.

The ones I'm looking at include the PIC16F1455 (available as 14-pin DIP), the PIC16F1459 (available as 20-pin DIP), and the PIC18F45K50 (available as 40-pin DIP).  Note that the datasheets have "(L)" in the part names, e.g. the datasheet for the PIC16F1455 and PIC16F1459 is called PIC16(L)F1454/5/9.  The L indicates low voltage operation.  There is a PIC16F1459 which operates at 5V, and there is also a PIC16LF1459 that operates at 3V.  This threw me off at first and caused me to order the wrong part (but it was a free sample :-).

I'm going with the 5V ones as I can power them directly from the host (one of Microchip's sample circuits suggests connecting via a ferrite bead) and have one less thing to worry about.  I'll likely use the PIC16F1459 as my mainstay simple microcontroller, the PIC18F45K50 when I need more GPIOs, and the PIC16F1455 if I somehow need very few GPIOs (and happen to have a few 16F1455's lying around).
0 Comments

My First PCB

1/29/2014

0 Comments

 
I made my first PCB a few months back.  It's a very simple breakout board for the AT26DF161A-SU, a serial flash IC that I'm hoping to experiment with.

Designed with DipTrace and fabricated by OSH Park, it was also a good end-to-end exercise for me.

The board was under one square inch, so I thought I'd pay the minimum $5 fee to OSH Park (since they charge $5 per square inch).  It turned out that they do not have a minimum, and they charged me the fractional price, $3.10!  That's for 3 boards, with free shipping!  They're just awesome!

I put my DipTrace files on github, along with the rendered images from OSH Park (during submission, they show you the images before asking you to confirm).

Here is a photo of two of the real boards I got back:
Picture
0 Comments

DipTrace and OSH Park

1/24/2014

0 Comments

 
Kuzyatech has a post on how to use DipTrace with OSH Park.  It covers Design Rule Check and exporting of files.

Based on that post, I made the following batch file to automate the renaming of files after export.
@echo off
if "%1" == "" goto error
mkdir OSHPARK
copy Top.gbr "OSHPARK\%1.GTL"
copy Bottom.gbr "OSHPARK\%1.GBL"
copy TopMask.gbr "OSHPARK\%1.GTS"
copy BottomMask.gbr "OSHPARK\%1.GBS"
copy TopSilk.gbr "OSHPARK\%1.GTO"
copy BottomSilk.gbr "OSHPARK\%1.GBO"
copy BoardOutline.gbr "OSHPARK\%1.GKO"
copy Through.drl "OSHPARK\%1.XLN"
@echo on
@echo now go zip up the OSHPARK directory
:end
@exit /b
:error
@echo diptrace2oshpark ProjectName
diptrace2oshpark.cmd
File Size: 0 kb
File Type: cmd
Download File

To use:

1.  Export files per Kuzyatech's post, but skip the renaming, and let DipTrace name the files as it wishes.  Make sure all the files get saved to the same folder.

2.  Copy batch script into same folder.

3.  From the command shell, execute the script in its new location, giving it your project name as an argument.  For example:
C:\ExportedFiles> diptrace2oshpark MyPCB

4.  There will be a new subfolder named OSHPARK that has the files that OSH Park requires, renamed appropriately.

5.  From inside the OSHPARK folder, zip the files into a zip file named after your project.  To verify, look inside the zip file and make sure that all the files are at the top level.

6.  Submit zip file to OSH Park.
0 Comments

OSH Park

1/24/2014

0 Comments

 
OSH Park is a super resource for hobbyists looking to fabricate printed circuit boards.  It is a board aggregation service: you send in your design, your design gets aggregated with others' designs onto one big board, and when there are enough designs to fill a big board, the order is sent out.

Started as a part-time service for fellow hobbyists, it has grown so popular that Laen (check out this fascinating interview), the person behind OSH Park, has quit his day job to run this fulltime.  The big boards now get sent out several times a week.  OSH Park has even bought SparkFun's competing BatchPCB service!

OSH Park prices 2-layer PCBs at an unbelievably low $5 per square inch, for three boards, and throws in free shipping!  Their boards have a unique purple color.  If you see photos of purple-colored PCBs on the web (e.g. open-sourced projects), they likely used OSH Park's service.

0 Comments

DipTrace

1/22/2014

1 Comment

 
I've tried to learn EAGLE PCB a couple of times, but each time, the learning process became its own big project, bigger than the simple PCB projects I wanted to use it for.  The user interface is most unintuitive, is quite modal, and is different from most other software you use a mouse with.

Some months ago, I learned about DipTrace.  It is a joy to use.  The user interface makes sense and is mostly what I expected (most guesses turn out correct).  When I use it, I'm able to learn just enough features for my immediate needs, and focus on my simple PCB projects.  A free, non-profit, hobbyist edition is available, and commercial editions are very reasonably priced.

I will likely still have to learn EAGLE in the long term since there are more components for which it has libraries, but in the mean time, I'm productive wth DipTrace.
1 Comment

MSP430 Downside

1/22/2014

0 Comments

 
The MSP430 is a very convenient microcontroller to use, with a decent toolchain, and a cheap way to get started with the LaunchPad.  However, the MSP430 family does not offer 5V chips.

0 Comments

    VccGnd

    Hardware with a software twist.

    Archives

    February 2014
    January 2014
    September 2012
    August 2012
    July 2012

    Categories

    All
    7LED
    Android
    Ascii
    Crystal Free USB
    Crystal-Free USB
    Dev Boards
    MSP430
    Overviews
    PCB
    PIC8
    Sourcing

    RSS Feed

Powered by Create your own unique website with customizable templates.