element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Legacy Personal Blogs Surprisingly Simple PIC development
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: YT2095
  • Date Created: 13 Apr 2012 10:16 AM Date Created
  • Views 577 views
  • Likes 2 likes
  • Comments 0 comments
Related
Recommended

Surprisingly Simple PIC development

YT2095
YT2095
13 Apr 2012

to quote Hannibal Smith, "I love it when a plan comes together" <insert cheesy grin>

Pointed in the right direction by our latest member of the Month (Robotonics) in this thread: http://www.element14.com/community/thread/17634

the deal went down and I ended up with one of these PIC18F4550 chips (along with quite a few others!), having only had experience with the OTP 16C54 and 57 chips using Seriously obsolete kit! I spent an evening reading the Data sheet for it and also researching programmers for it.

but as it happened, I was Given a brand new PICKit2 by Element 14 a while back as a "member of the month" gift...

yeah, you can probably see where I`m going with this image

 

So, in a nutshell, I set about making a little PICKit connector to Breadboard (an `L` bend pin array), and managed to get a working circuit with this 4550  using all this cool free stuff (my favorite price).

 

the Hard part (of which I`ll share so it isn`t hard for anyone else) was getting the lot tied together in a way that I can think of a problem, explain it in a computer languge I know (in this case I chose BASIC), and writing a prog and then *shudder* uploading it!

 

I`d alread used Great Cow Basic with my pic 16c5x`s so I knew I had a good front end for my toolchain, oddly the "Compile and download with PICKIT2" option didn`t work???

so I just compiled that into an ASM file instead, and then saved it.

at this point I`m (or you would be) half way there!

downloading the free MPLAB s/ware (I use MPLAB v8.84) I was able to then pick up that saved ASM file from GCBasic and open it in MPLAB, by going to FILE then down to OPEN and picking the file.

Then you simply go to the PROJECT tab and then down to "Quickbuild no. asm file" and click that, all being well (and I`v never had a problem yet) it will say Build Successful.

Now you have your .HEX file! image

then go accross to the PROGRAMMER tab and pick what your using for your programmer, in my case it`s the PICKit2.

That menu pull down will Change after you select, into the Full Programmer menu.

so go into it again and click "Program".

now this is where it goes a bit strange (In a good way!) when I did that the first time it seemed that Nothing happened apart from some writing in a window.

I did it again but clicked whilst looking at the PICKit, and almost too fast to see, the Red light (Busy) came on then off!

such a Dramatic change from the Arduino! whereby it`ll compile, then think about it, then wait a while, have a cup of tea, upload some stuff that flashes LEDS, wait a little longer, then upload the program (probably whilst dunking biscuits in said tea).

don`t get me wrong, there`s nothing wrong with the marriage of Biscuit and Tea, but it really shouldn`t take that long to send a little bit of code!?

a thing to remember is to either Unplug the MCLR wire or go into the "Programmer" drop down, and select "Release from Reset", if you don`t do either your program won`t start running, so you need to set this pin HIGH again to resume normal activity.

 

and it REALLY is as simple as that!

 

I`m a complete Newb at this sort of thing and I managed to figure it out, it really isn`t as complex as it looks, these IDEs can look Very Intimidating with a million tiny windows open on one page and kazillion options to pick from on each etc... it needn`t be that way to get a simple program working on a chip image

Now, if you Already know a language like C you can cut out one aspect of my currently prefered toolchain that uses BASIC as the front end, and just get programming, Microchip do a free C compiler too, C18 is what I would have to have used but I don`t do C (yet).

 

I would strongly reccomend the use of a Genuine PICKit2 or 3 programmer though, A) they`re built well and should last a lifetime in ordinary use. B) DIY stuff at an early stage may introduce problems that are hard to understand when you have nothing to compare against. C) they`re fairly inexpensive and as L`Oreal says "You`re worth it" image

 

now for a bit of eye-candy (I love seeing other peoples circuits), here`s a PIC (pun intended) of my setup, do try to ignore the arduino nano in the top right, all my boards have one mounted on them, but this one is not in use.

 

image

 

it`s a simple 16 bit Binary counter across 2x 8 bit ports, in this case ports B and D.

I`m going to be messing with USB next, how hard can it be... What could Possibly go wrong?

 

peice of cake! image

 

 

 

 

 

Special Thanks David (Robotonics) and also Element 14 for your help in this.

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube