loading

microcontroller help

hi i got a

PICkit 2 Debug Express kit
http://www.microchipdirect.com/productsearch.aspx?Keywords=PICkit+2+Debug+Express

and a

PICkit 2 Low Pin Count Demo Board http://www.microchipdirect.com/productsearch.aspx?Keywords=DM164120-1

for my birthday and i was wandering where can i go to get started with it and what can be created using them. all help will be greatful thanks =)

sort by: active | newest | oldest
1-10 of 12Next »
westfw8 years ago
Try here: http://www.winpicprog.co.uk/pic_tutorial.htm or
http://www.voti.nl/swp/index_1.html

You'll need to make some changes in the way you do things to account for the different hardware, but the progression should be similar.
I suppose that it is somewhat unfortunate that there isn't a "configurable" PIC tutorial that can be quickly customized to reflect whichever development board happens to be "in vogue" at a particular time. With PICs in particular, there is a problem that many of the early hobbyist literature is written for a chip that is now long-obsolete and "inadvisable for current use" as well as abnormally expensive...
jimbojonesy (author)  westfw8 years ago
cool thank you for the links, well my Low Pin Count Demo Board dosent work so i will start learning using the debug express kit which comes with an embedded PIC16F887 where the pic looks square and has 44 pins i think its called something like QFN, i have seen on some forums people make programmers for the rectangle pics PDIP??. so when i do want to write code to a pic i will see how to make a programmer hopefully it will be easy. well im back to reading those links, thanks once again
If you have a real microchip board like the Low Pin Count Demo Board that doesn't work, I believe you can call up microchip and get it replaced...

Your pickit2 IS a programmer, BTW. It should program nearly any of the relatively recent PIC microcontrollers; not just the LPCDB it comes with... You just need to connect the write chip pins to the right pickit2 pins.
jimbojonesy (author)  westfw8 years ago
hi i have been busy with my pickit 2 and the debug board with the embedded PIC16F887 i/pt, at the moment i have just being playing with the 12 lessons files that it comes with which plays with the leds on the board which are connect to RD0-RD7 . the language the tutorials use is asm (is that a good place to start? i heard picbasic is ok but not sure). i can now understand what you mean by the early hobbyist literature for older chips, because i have no luck finding stuff for the pic16f887 im guessing a good place to start would be the data sheet
http://students.iitk.ac.in/roboclub/roboclub/41291D.pdf

also thanks for the tip about using the pickit 2 for programming this will be usefull when i have to programm some pics after i have made some code.

im guessing once i have read about this pic others should be easier? the part i may find confusing is at the beggin of the asm you have to write the files for the relative pic

example

#include <p16F887.inc>
CONFIG _CONFIG1, _LVP_OFF & _FCMEN_OFF & _IESO_OFF & _BOR_OFF & _CPD_OFF & _CP_OFF & _MCLRE_OFF & _PWRTE_ON & _WDT_OFF & _INTRC_OSC_NOCLKOUT
CONFIG _CONFIG2, _WRT_OFF & _BOR21V

org 0
Start:
bsf STATUS,RP0 ; select Register Bank 1
bcf TRISD,1 ; make IO Pin RD0 an output
bcf STATUS,RP0 ; back to Register Bank 0
bsf PORTD,1 ; turn on LED RD0 (DS0)
goto $ ; wait here
end

that is from lesson 1, i am confused about the commands under the top include section and im guessing TRIS is and PORT is relative to the pic im using. well i think its time for me to read that datasheet.

thanks again

  • #include <p16F887.inc>
The include file for each particular CPU contains a bunch of constants defined so that you can refer to the ports and bits in each port and other values by the names that are listed in the datasheet, (like PORTD) rather than by the numeric values that the assembler would otherwise want (8) Since the values and names change with different chips, this info is in a separate file rather than built into the assembler itself. (This will also cause you to get error messages if you try to do something with PORTD on a chip that doesn't HAVE a PORTD, which is quite useful too.)

  • CONFIG _CONFIG1, _LVP_OFF & _FCMEN_OFF & _IESO_OFF & BOR_OFF & _CPD_OFF & _CP_OFF & _MCLRE_OFF & _PWRTE_ON & WDT_OFF & _INTRC_OSC_NOCLKOUT CONFIG _CONFIG2, _WRT_OFF & _BOR21V
This sets the configuration fuses of the device; whether the reset pin does RESET or is a normal IO, what type of clock source you're using, things having to do with the core hardware functions of the chip. As a beginner, you might as well just think of this as "magic incantations necessary for the program to work right"; a lot of it is pretty deep and mysterious, and more a function of how Microchip put their demo board together than anything you are doing anyway. (This sort of "magic incantation" happens a lot when you're learning some new computing thing. "You need this so that it will work, but it's not really relevant to what you're supposed to be learning in this section of the class." In my days it was the "Job Control Language" parts of the card deck that the computer needed to know how to compiler and run my fortran program. "JCL" was a whole complex language of its own, not appropriate for beginning fortran programmer to need to understand. For now, some pieces of your PIC program are going to be like that as well.)

jimbojonesy (author) 8 years ago
yeah thanks =) all those seem rather advanced i was wandering if any would know on where i would start, also if i would need any other equipment that would be helpfull at the start so far it looks like i need to get a breadboard to make things wasier, thank you for the help so far
a matrix board is allwys great thing you can build a project as is and then hack on the existing project to learn before you do something from the ground up
is there a free compiler (similar to avrstudio, just for pic)? That's one of the main reason I use avr, but I also have a pic programmer
jimbojonesy (author)  guyfrom7up8 years ago
i skimmed some avr vs pic articlesi hope starting with PIC was a good choice ;o
I started off with pic, but I could never get it to comunicate with my computer (until recetly I bought a usb programmer because a lot of online projetcs use pics). So gmoon eventually converted me (he helped me with pic, but I could really only get avr working) to avr. Supposedly (may be wrong) avr's are more powerful and efficient because of the structure (like 8 times faster for the same clock speed, and a lot of them work on mere uA). Plus AVRstudio is free. Downside of AVRs: Atmel is terrible at giving out samples, I got a sample 2 months later when I forgot about it, or they may not even send one at all. microchip (maker of Pic) is very good about giving out samples. AVR programmers are more complicated, but I bought one for only 10 dollars (do not get a serial Pic programmer, I bought one from sparkfun and it burned out my serial port, parallel is fine).
1-10 of 12Next »