Microcontrollers ???

Discussion in 'Embedded Systems and Microcontrollers' started by Mathematics!, Dec 1, 2008.

  1. Mathematics!

    Thread Starter Senior Member

    Jul 21, 2008
    1,022
    4
    I have downloaded MPLabs and wrote/compiled some programs for different devices. I am really good at assemblier , c/c++ , and java.

    My question is I have never programmed any firmware or PIC chips etc etc...

    So for Christmas I don't know what I should get. I.E what programmer is the best to program different chips.

    I want beable to hook into the pay as you go phones and upload /download new firmware. Changing MAC address of phone etc etc..

    Also I would like the ability to program a BIOS chip for a given mobo.

    Even hook into a cable modem ...and download /upload firmware.

    Creating robots and wireless devices (RF , IR ,.... devices )

    So I just want your guy's opinion on what I should get.
    Note my computers have serial and parallel ports however I would like to use usb because it's more portable now then serial and parallel ports.

    Thanks for any help.
    And obviously I don't want to have people spending tons of money.
    A few hundred dollars is OK.
     
  2. bertus

    Administrator

    Apr 5, 2008
    15,648
    2,347
  3. Mathematics!

    Thread Starter Senior Member

    Jul 21, 2008
    1,022
    4
    I was just kind of looking for somebody to tell me what the best kit from www.microchips.com would be for starting. I just want to start making devices. And I thought the PIC chips and startup kits are a good start.

    I am just wondering whatever body else recommends.

    Remember I prefer the programmer to plug into a usb.

    I was just wondering if I bought just a few PIC chips could I just place them in a solderless breadboard and run a wire to the serial port to the breadboard to program it. I guess what I am asking is what the point of a programmer is. If you just have a solderless breadboard and the PIC chip plus a serial or parallel connector. Could I just solder the connector to a few wires. Plug it into the serial or parrellel port of the computer and then
    run the end of the wires to the pins of the PIC chip.
     
  4. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    It's very iffy running a PIC or any microcontroller in a solderless breadboard. Way too much stray capacitance.

    You can always try, but a printed circuit board is going to be much more certain to operate as predicted.

    You can always check and see what features are included in the programming board. The AVR family of microcontrollers is also very capable. I don't use either as yet, so I won't make suggestions.
     
  5. bertus

    Administrator

    Apr 5, 2008
    15,648
    2,347
  6. nanovate

    Distinguished Member

    May 7, 2007
    665
    1
    You can if the PIC has a bootloader and a uart built-in. You would also need a level converter IC like the MAX232. Or you could do a FTDI or AT90USB chip to go from USB to the PIC's uart.

    The ICD2 from Microchip will program all the PICs. There is also the PICkits which can get you started.

    From Atmel you can get a STK500 which also programs all the AVRs and has connectors for many of there PDIP parts.
     
  7. Mathematics!

    Thread Starter Senior Member

    Jul 21, 2008
    1,022
    4
    So what would you suggest for a programmer. My objective is to beable to program as many different chips as possible AVR's , PIC's ,...etc etc

    I want to keep the programmer with in a $100.
    And what chips should first get to start out with?
    Alot of people suggested AVR'S for the chips

    http://uk.farnell.com/microchip/pickit2promo/development-programmer-promo-w/dp/9945350

    and
    http://uk.farnell.com/microchip/pic14000-04-sp/8bit-cmos-mcu-14000-sdil28/dp/9759069

    http://uk.farnell.com/atmel/atmega644pv-10pu/avr-mcu-64k-flash-4k-ram-spi/dp/1455124

    Any disagreement or better sugestions.
     
  8. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    If you choose to use PIC rather than AVR, be prepared to pay dearly for the code development software.

    The AVR code development software is FREE for both the C-compiler and the Assembly-language. You will not believe how good the FREE development software is.

    hgmjr
     
  9. nanovate

    Distinguished Member

    May 7, 2007
    665
    1
    The PIC14000 is OTP... you want a Flask based chip like the PIC16F688 or PIC16F690 so you can reprogram them.

    The Compilers of the PICkit2 is a demo version that only supports a limited number of devices in the PIC12 and PIC16 parts. There are student versions for the PIC18 and PIC24 that are free.

    The AVR STK500 programs all the AVRs except the XMEGAs it has connectors for most of the DIP parts $80

    The AVR ISP Mk2 programs all the AVRs $40 but it is just the programmer.

    The AVR Dragon programs all the AVR except XMEGA and also debugs them up to 32K $50. It has a prototype areas you can put a ZIF socket into for parts.

    Compiler is free and full strength for the AVR. The AVR share a common core so moving up or down in size is fairly easy -- you do not have to completely redo your source code.
     
  10. Mathematics!

    Thread Starter Senior Member

    Jul 21, 2008
    1,022
    4
    So does that mean all you would have to do is write a program to send the data out your serial or parallel port. Or get some freeware to do that.
    Because I know how to read/write to com ports ,...etc etc

    As for the AVR chip's can they all be reprogrammed again and again????
    And is it true for PIC chips as well?

    Plus for PIC you are giving me the impression that they cost more to get all the software / gear to do anything with them? Why is this, I thought MIT would have some free software for you....

    Anyway I am think about getting what I posted.
    Seems like everybody is in agreement with using AVR's for starter's.

    Why the difference in this
    and

    I would think the latter is better because you have a prototype area and a debugger? Why the $30 difference???

    Also one last question if you lock a chip is their any easy way to read/write to it again. That is set the lock bit???
    Somebody told me that you could ripe off the plastic and flash it with a UV laser. Basically if you never lock a chip then can you always read/write to it as many times as you want. (I.E reprogram it as many times as you want)

    Can AVR chips be used for robotics and sending data wirelessly?

    Thanks for the help in pick this stuff out.
     
  11. bertus

    Administrator

    Apr 5, 2008
    15,648
    2,347
    Hello,

    If you want to know more about AVRs , take a look at the AVR Freaks website.
    http://www.avrfreaks.net/

    Greetings,
    Bertus
     
  12. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    The programmer is simply that. It can only program the PIC device. You will need to acquire a code development software to produce the code that you would then download to the device with the programmer. I don't know of any free code development software for the PIC family of microcontrollers.

    Absolutely! They both have in-circuit programmability.

    I know of no free PIC code development software.

    The Pickit2 Starter Kit cost around $50. In the kit you get the programmer, the development software, and a protoboard for use in hardware and software development.

    The STK500 board is $80 from Digikey. It has eight user assignable pushbutton switches, eight user assignable LEDs. The board contains a built in programmer that you can use to program your own board once you build it.

    The STK500 can program about 30 of the AVR devices. 8pin, 20pin, 28pin, and 40 pin DIP packages are supported.

    The AVR and PIC can both be locked. I don't think it is practical to reverse engineer a PIC or AVR design that has been locked.

    Absolutely!!!


    hgmjr
     
  13. Mathematics!

    Thread Starter Senior Member

    Jul 21, 2008
    1,022
    4
    I don't know of any place you can legally download MPLAB without paying for it.

    Many companies do set the security bit in their PICs and AVRs to protect the investment they have in the code. You can clear the security bit on some microcontrollers but in doing so it automatically erases the content the memory.

    Companies who lock there micros have control over the source code and can update the code and reprogram the devices at will.

    hgmjr
     
    Last edited by a moderator: Dec 5, 2008
  14. Mathematics!

    Thread Starter Senior Member

    Jul 21, 2008
    1,022
    4
    So if you had a chip that security bit was set and you didn't care about what was contained on it. Could you still use it by clearing the security bit???

    Ya , But if they make an update and your chip is locked they cann't update your firmware. Unless they do it by clearing the security bit (wipeing the memory) and then writing the new firmware to your device then locking it again.

    AHH is this what they do?
    So then most chips are not unusable if the security bit is set.
    All you would have to do is clear it to start to use it for another purpose.
    That is if you didn't care for what is on the chip in the first place.

    My other thing is if they provided a firmware update then couldn't you just disassembly the update before updating?
    Because then the whole integrate of the security bit is flawed.
     
    Last edited: Dec 5, 2008
  15. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Precisely.

    hgmjr
     
  16. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    If the company that created the firmware is foolish enough to provide the firmware to someone who might reverse engineer it, then they deserve to have it stolen.

    hgmjr
     
  17. nanovate

    Distinguished Member

    May 7, 2007
    665
    1
    You can download MPLAB from Microchip for free.
    http://www.microchip.com/stellent/i...E&nodeId=1406&dDocName=en019469&part=SW007002
    The MPASM assembler is free.

    The compilers for the PIC12/14/16 are not free and must be purchased from a third party vendor. Those vendors have limited demo versions that you can get for free. They are restricted by code size or device support or both.

    Microchip provides compilers for their PIC18, PIC24 and dsPIC for charge (seperate compiler for each). They also have limited student versions of the same. The third party vendors also have seperate compilers for Microchip's those other devices.

    You still need hardware to program the chips-- PICkit2, ICD2, etc... To program using a serial port still requires this hardware (at least once). Many of the PICs require a high voltage ( like 10V+ ) on the VPP pin to program them. Even if it can self program then you need to load a small bootloader on it which requires you to use the programmer at least once.

    The AVR shares a common core among all it devices. The same compiler can create code for all of them: ATtiny, MEGA, and XMEGA. There is a gcc-based compiler WINAVR that is free and full functioned. There are also third party vendors that sell compilers for them. There is little to no difference in performance or code density between the commercial compilers and the WINAVR. What you get if buy the third party compiler is more direct customer support and contractual stuff. Because they all share a common core you can write your programs to be very portable from one device to another. I have literaly cut-n-pasted code written for one device and put it into code for another device.

    The programming section of the STK500 supports all of the ATtiny and MEGA devices either through the on-board sockets or through daughter boards or you can put a 6-pin header on your prototype board and run a 6-wire cable from the STK500 to your protoboard. The STK500 also supports the high voltage parallel mode which allows you to erase locked chips.
     
  18. Mathematics!

    Thread Starter Senior Member

    Jul 21, 2008
    1,022
    4
    Do they have a disassembler for all chips ? Or do you have to make one by looking up the instruction set of the chip.

    As for the cost of the compiler stuff. This is only because people feel more comfortable with writing in c as opposed to asm. Right.
    I mean you could still use the MPASM for assemblying your code for free.
    Or does MPASM only work for nonPIC chip's. Either way I am sure I can find something free on a torrant site.............

    Thanks for the input. But I am probably going to use AVR first anyway.
     
  19. nanovate

    Distinguished Member

    May 7, 2007
    665
    1
    MPASM is included with MPLAB
     
  20. Mathematics!

    Thread Starter Senior Member

    Jul 21, 2008
    1,022
    4
    So I have been looking thru MPLab.

    I think you can use it for PIC. I am under promate under setting's and you can select device PIC 8 16 20 , ...etc etc.

    Code ( (Unknown Language)):
    1.  
    2. The PRO MATE II is a Microchip microcontroller device programmer. Through interchangeable programming socket modules, PRO MATE II enables you to quickly and easily program the entire line of Microchip PICmicromicrocontroller devices and many of the Microchip memory parts.
    3. PRO MATE II may be used with MPLAB IDE running under supported Windows OS's (see [FONT=courier]Readme for PRO MATE II.txt[/FONT] for support list), with the command-line controller PROCMD or as a stand-alone programmer.
    4.  
    And I didn't have to pay anything it is right on their site free.
    Also I got for free the pcclite , Which is a c compiler that should compile PIC chips .
    So I don't understand where the more expensiveness comes into play with PIC chips.

    Either way is their an AVR or MCU IDE for free because I think MPLAB doesn't support these chips don't see them listed anywhere
     
Loading...