Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PIC] Microcontroller Firmware & Host Software

Status
Not open for further replies.

Solderbox

Newbie level 6
Newbie level 6
Joined
Jan 2, 2015
Messages
12
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Location
Florida
Visit site
Activity points
96
Hello all,

I have been experimenting with PIC Microcontrollers and I would like to expand my knowledge. I have bought 4 PIC Microcontrollers, one of which is a 16F4550. As of now the microcontroller has no function. I would like to know how to write the firmware and Host Software for this microcontroller without using any programmer. I would like to communicate to microcontroller directly with a computer. Thanks!

-Solderbox
 

There is no 16F4550 but there is 18F4550.

I would like to communicate to microcontroller directly with a computer.

To do that first you have to connect your microcontroller to a programmer like PICKit3 and then burn the bootloader for your device. Then you can connect MCU to PC using USB and load application firmware to MCU.
 

I would like to burn the boot loader without using a pickit. Imagine I had the VERY FIRST PIC micro controller and I have to program it. Imagine There is no such thing as a pickit. How would I get the boot loader onto the chip without any other hardware other then a computer. My apologies I have an 18F4550.
 

There are a number of designs for PIC programmers on the net, and many use the parallel or serial ports from your computer. However that also moves the problem back into your computer in that you need to drive those programmers with software (NOT necessarily the MPLABx or similar IDEs - they expect to talk to to a PicKit or ICD type programmer).
It can be done but is:
1) tedious in the extreme to build the hardware and then create the required software
2) very unreliable in that you have no idea where the problems might be if the device does not program
3) modern computers tend not to have parallel and serial ports on them - it is all USB these days - and many of the circuits state they do not work with USB to Serial converters
Unless you buy large quantities from Microchip, all of their MCUs come unprogrammed and so you need something to get the first bit of code into them.
I would recommend a PicKit 3 or similar device. They are current devices and therefore supported by Microchip, they can program all of the available MCUs (certainly the PIC18F4550 - and new firmware is released for the newer families of devices as they are released) and they really do not cost a lot (about $50 here in Australia) when compared with the number of times it will be used and the ability to use it when you move to different devices.
Also, do not get hung up on the idea that you need a bootloader. They take up space that will (eventually) limit the size of your application. Using an ICSP (such as the PicKit3) will let you program the entire chip directly from the IDE. Also, you need to make sure that you are using a bootloader that can interact with the IDE directly. Some require a separate program that reads the hex file and loads that but is not integrated into the IDE itself.
There are some bootloaders that also let you debug the code but most are simply programmers. Without the ability to debug your code, life can get very hard very quickly.
(This is from personal experience as I started to build my own as well - nothing really worked and it cost me almost as much to buy the parts for several failed attempts, not to mention hours of my time. I bought a PicKit3 and it immediately worked and let me get on with what I really wanted to do. That was about 5 years ago and I've not looked back.)
Susan
 

I appreciate your response. My hobby is learning how to use these micro controllers and understanding the technology (not necessarily creating programs for them). So, tedious as it may be, that is my hobby and I would like to do as you tried to do (Create my own ICSP). Creating my own ISCP and IDE would no doubt teach me how computers communicate with MCUs and the language in which they communicate. If the people who created PicKit 3 have done it, surely it is possible for me to duplicate or replicate their process. Given your past experience with this what would you recommend as a point moving forward?
 

Certainly it is possible, and if that is the way you want to go then that is fine.
I would suggest that you start with a completely working system and gradually substitute in your own parts. That way you are solving the issues in one part of the system at a time, knowing that everything else is working correctly.
The ISCP programmer may we be one of the easier parts in that you can get a scope onto the leads and check things like clocks and data signals.
I would question how far you want to go with an IDE - even some of the commercial places produce fairly rubbish IDEs (in my opinion) with all sorts of bugs limitations, especially when they try to do things like their own source code parsing toy show syntax errors etc..
Susan
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top