Author Topic: New to PIC microcontrollers  (Read 800 times)

0 Members and 1 Guest are viewing this topic.

Offline JayKayTopic starter

  • Beginner
  • *
  • Posts: 2
  • Helpful? 0
New to PIC microcontrollers
« on: April 27, 2012, 11:22:40 AM »
Hi Folks
 
I am very new to microcontrollers (specifically PICs) and I am not a sofware guy, as such I do not know C or assembly. I have programmed in BASIC for the BASIC STAMP and that was fine (the higher the language the better I can do it).
 
What I am trying to do and be cost effective is program 2 chips (12F508 and 12F675). I have no hardware (programmer) nor any software at the present time so its a fresh start
 
I am running a PC with XP with USB ports and no serial ports. As a senior citizen (retired EE...analog career) I want to continue to keep inventive thus my new ham radio antenna project.

I have come to this forum as I believe those in Robotics probably have a good sense what is out there at very cost effective prices and maybe freeware. Another forum just told me to spend all kinds of money for the software.

1) Goal is for me to get a PC based application to write the code in BASIC, compile with checking (into assembly) and then convert to hex...I assume thats the sequence but not sure.
2) Output the hex data on one of my PC USB ports to the board (programmer I guess its called) to burn the PIC chip
3) Since I'll be doing this very rarely, I am trying to keep my costs down
4) It would be great if the the programmer board would be powered by the USB port on my PC and had the proper voltages available for the microcontroller .. maybe only need to add a zener or regualtor.
5) The first microcontroller (675) need only look at its A/D port and then generate a series of pules at GP1 and GP0 based on the voltage level at AN2
6) The 2nd microcontroller (508) need only look at a GP0 and determine when an incoming pulse goes low and ouptut a 1 or 0 a GP1
 
 
Any suggestions for this microcontroller newbie would be appreciated.
 
Thanks
JayKay
« Last Edit: April 27, 2012, 11:36:24 AM by JayKay »

Offline infurl

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
Re: New to PIC microcontrollers
« Reply #1 on: April 27, 2012, 04:50:12 PM »
Have you looked at using a picaxe? It's a PIC microcontroller that comes preprogrammed with a runtime and bootloader and you can work with them in much the same way as the old Basic Stamps. They have the advantage that you can use them as just a smarter kind of microcontroller, with the only drawback being that they are less flexible.

http://www.picaxe.com/

I've been messing around with PICs for about 10 years. It is quite easy to make a programmer for them that runs off a serial or parallel port and there is plenty of open source software available for working with them. I've written my own programmer and bootloader for them and I use SDCC to compile C programs for PIC18s now. http://infurl.net/#2011-03-23-Serial-Interface

However you would be better off getting an inexpensive PicKIT3 USB programmer and using the free software tools provided by MicroChip.

http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en538340
http://www.microchip.com/pagehandler/en-us/family/mplabx/

While the high level language compilers are not free, they do at least have "light" versions that are free in most cases, which would be more than enough for your project.

Offline JayKayTopic starter

  • Beginner
  • *
  • Posts: 2
  • Helpful? 0
Re: New to PIC microcontrollers
« Reply #2 on: April 27, 2012, 06:47:57 PM »
Thank you very much for your response. I appreciate the time you took with your response. I did state it was for 2 chips..should have said 2 unique chips.

I believe a picaxe chip is more expensive than a PIC chip (8 bit). I'll  need at least 10 pieces of the 508 in a serial data configuration...thus unit price becomes a factor.

Can you recommend a "lite" version of Basic compiler? Can I write code in a plain text editor and then place it into a "lite" compiler to create ASM and HEX files?  Can I then take that file (ASM or HEX) and read it into their MPLAB software to download it into the PIC chip via the PICkit3? Do I assume their software needs to know the target PIC for it to load it properly and do an error check on the code?...You can tell I'm a PIC newbie.....

I just have no idea how to do a PIC .. I did do a BASIC Stamp a few years ago in reading 232 data, stripping what data I needed and then using that to select the proper antenna for my ham radio station.







Offline danish666

  • Beginner
  • *
  • Posts: 2
  • Helpful? 0
Re: New to PIC microcontrollers
« Reply #3 on: May 18, 2012, 11:47:53 PM »
everything you said is pretty much spot on.

By error check, i guess you are referring to compiling and debugging, cause in that case, it has has to be done as soon as you write down the program, i.e. just before feeding the program to the chip.

and yes, it is no assumption, but the software definitely needs to know the PIC in use; otherwise you can imagine all kinda wierd things happening ;like the program not loading properly oor IC burning down.

 


Get Your Ad Here