1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

PIC Programmer.

Discussion in 'Electronic Projects' started by Hero999, Jun 18, 2007.

Thread Status:
Not open for further replies.
  1. Hero999

    Hero999 Banned

    Joined:
    Apr 6, 2006
    Messages:
    14,902
    Likes:
    79
    Location:
    England

    Attached Files:

  2. Hero999

    Hero999 Banned

    Joined:
    Apr 6, 2006
    Messages:
    14,902
    Likes:
    79
    Location:
    England
    All I need now is some software to use with this.

    I'd prefer it if it's for Linux or will at least run under WINE as I am slowly moving away from Windows and I would also prefer it if it's open source. I've checked out Nigel's site but it all appears to be Winwoes only although I will check to see if some of it will run under WINE.

    Then I'll set about building an LED flasher.

    I also have a project planned for a PIC, it's a bathroom extractor fan timer. The idea is you pull the switch once and it turns the fan on for 10 miniute, pull it twice and it stays on continuously and pull it again to turn it off. I did origionally design it using a 555, a dual flip flip IC and a quad NAND IC but now I've finally decided to get into PICs I've decided to abandon that approach.

    What PIC should I start with?

    I want something with a built in oscillator, a minimum of two IO pins (one for the switch and one for the output) and that comes in a small DIL package with minimal pins.
     
  3. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,213
    Likes:
    640
    Location:
    Derbyshire, UK
    Check the PICList, there is a small amount of Linux stuff out there!.
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA

    For the bathroom fan check out
    PIC12F609-I/P 8 pin 1.75KB Flash 64B RAM 6 I/O 8MHz internal oscillator

    For general learning I like the PIC16F88
    • 8-Bit Microcontroller IC
    • 7K bytes Flash
    • 8 MHz Int Oscillator
    • Number of I/O Pins:16
    • Clock Speed:20MHz
    • Package/Case:18-DIP
    • EEPROM:256
     
  6. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,213
    Likes:
    640
    Location:
    Derbyshire, UK
    I makes a LOT more sense to specify program memory in words, because that's how it's used (and the only way it can be used).

    So the 12F609 has 1K words of memory, and the 16F88 has 4K words.
     
  7. Hero999

    Hero999 Banned

    Joined:
    Apr 6, 2006
    Messages:
    14,902
    Likes:
    79
    Location:
    England
    Thanks for the replies.

    Wow there is a lot of choice, I suppose as there are no special requirements for my application then would I be wise just buying the cheapest PIC possible?

    I can't find the thread be I remember Nigel suggesting a PIC in place of a 555 awhile ago and I can't remember which one he suggested.
     
  8. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,213
    Likes:
    640
    Location:
    Derbyshire, UK
    Any 8 pin one would do, the 12F609 mentioned above would be fine.
     
  9. bananasiong

    bananasiong New Member

    Joined:
    Mar 7, 2006
    Messages:
    1,893
    Likes:
    7
    Location:
    Malaysia
    I'm not very sure about this, but I've faced this problem among my friends and I myself: The hardware and software have to be synchronized, i.e. not all the programming software support all type of programmers. Let's talk about parallel port programmer, some uses an inverter and some uses a buffer as the logic. So the programming software are different. But I'm not sure whether there is any way to make them to be universal. It is because some programming software doesn't support some new PICs.
     
  10. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    Best to know both. Both have value.
    Machines with larger instructions GENERALY require fewer instructions.

    Data is stored in bytes.

    No big deal. Why are you giving me guff ?
     
  11. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,213
    Likes:
    640
    Location:
    Derbyshire, UK
    The ONLY reason is as an advertising ploy, to make it appear larger than it is!, there's no value in splitting the words into bits and reassembling them in bytes.

    Not in PIC program memory it's not!.

    No guff, just making the point - it makes much more sense to specify the size of the memory as you use it.
     
  12. Hero999

    Hero999 Banned

    Joined:
    Apr 6, 2006
    Messages:
    14,902
    Likes:
    79
    Location:
    England
    So I take it that all PIC instructions are the same size on a specific device?

    I've done some assembler programming on both an x86 PC and a microcontroller (can't remember what type) and different instructions required different amounts of memory.
     
  13. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,213
    Likes:
    640
    Location:
    Derbyshire, UK
    On the low and mid range devices they are, for example the 16F series use all 14 bit words, and all instructions are just one word in length - so the 14 bit word can contain an eight bit data 'byte' and a six bit instruction (such as RETLW 0xFF - the RETLW is the first 6 bits, and the 255 the next 8).

    The 18F series etc. have a small number of double word instructions.
     
  14. Gayan Soyza

    Gayan Soyza Active Member

    Joined:
    Oct 23, 2006
    Messages:
    1,821
    Likes:
    19
    Location:
    Colombo
    I think for Hero999 its better start from windows & assembly language until you get descent knowledge in PIC programming Due to several reasons.

    *Easy to understand :)
    *More resources software’s (IC Prog, WinPicprog / Serial Port Emulators etc……) :)
    *More supported programming hardware’s :)
    *More debugging tools (simulators) :)
    *Plenty tutorials (microchip application notes) :)
    *More supported forum friends :)

    After that you can shift to any other OS or Higher Level Language or 18F series.

    All the best
     
  15. Hero999

    Hero999 Banned

    Joined:
    Apr 6, 2006
    Messages:
    14,902
    Likes:
    79
    Location:
    England
    I don't mind sticking with some Windows software for now but if I do then I still want the option of being able to take all my code and move to another piece of software on the the Linux platform without modifying it. I don't want to get locked into using a certain piece of proprietary software that I only origianlly intended on using temporally.

    By the way, here's the completed article.

    Now all I need to do is buy some PICs to program.
     

    Attached Files:

  16. bananasiong

    bananasiong New Member

    Joined:
    Mar 7, 2006
    Messages:
    1,893
    Likes:
    7
    Location:
    Malaysia
    Hi Hero999, the chassis looked nice :)
     
  17. Hero999

    Hero999 Banned

    Joined:
    Apr 6, 2006
    Messages:
    14,902
    Likes:
    79
    Location:
    England
    What do you mean chassis? I think you're probably takling about the box?

    The great thing about this project is it didn't cost me much in terms of personal time and money. I only payed for the ZIF socket (pretty cheap off ebay, I can't remmeber how much) and the copper clad board and etching materials, everything else was borrowed from either work or college ;). I've not been busy at work for the last few weeks (we're in between projects and I have been booking to waiting) so I could assemble the whole thing at work, the only bit I did at home was etching the PCB!

    The box was slavaged from an protoype the company had destined for the bin. It already had a few holes drilled in it but this was no problem as, for the most part, I needed to drill bigger hole in the same places, there was one hole where that wasn't the case so I just filled it with resin and as I've painted the whole thing with spray paint you can't see it anyway.
     
  18. Hero999

    Hero999 Banned

    Joined:
    Apr 6, 2006
    Messages:
    14,902
    Likes:
    79
    Location:
    England
    Right, I have installed WinPicProg and the program driver under WINE and it loads up with a couple of error messages.

    "WARNING - Loaded file has changed do you wish to reload?"

    How can the file have changed I haven't used it before?

    "DLPORTIO.SYS device driver has not loaded.

    Port I/O will have no effect."

    Apart from that, the user interface appears and it appears to be fully functional.

    I've still yet to get my hands on some PICs but I assume this error message means that it won't work under WINE as the driver hasn't loaded. This is no surprise to me, I wasn't expecting it to work but I just wanted to have some fun trying.
     
  19. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,213
    Likes:
    640
    Location:
    Derbyshire, UK
    Can't say I've ever tried it?, but I wouldn't expect it to work under WINE.
     
  20. Hero999

    Hero999 Banned

    Joined:
    Apr 6, 2006
    Messages:
    14,902
    Likes:
    79
    Location:
    England
    I've reasearched the most common suppliers in the UK:
    RS PIC12F508-I/SN £0.62
    RS PIC10F200-I/P £0.62
    RS PIC12F509-I/P £0.69
    RS PIC10F202-I/P £0.71
    RS PIC10F204-I/P £0.71
    Maplin PIC12F629-I/P £1.45 (Web Only)
    Maplin PIC12C508A-04/P £1.51
    CPC PIC12C508-04I/P £2.20!
    All prices include VAT.

    I've realised the the biggest cost will be shipping, Maplin charge £2.99 (free for orders >£35) and RS charge £7.50 (free for business account holders). Now as I don't have a business and I don't plan to spend more than £35 I think I'll probably end up picking it up from the store.

    I'll probably end up going to RS and buy 10 PICs at £6.20 rather than being ripped off at Maplin even though it is further to travel. The question is as which PIC is generally better, the PIC12F508-I/SN or the PIC10F200-I/P? Are either of them going to go obsolete soon?
     
  21. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,213
    Likes:
    640
    Location:
    Derbyshire, UK
    PIC's don't really go obselete very fast, they even still make antique OTP devices!.

    But most PIC's are pretty interchangeable, with only very minor changes required to the code, as there's only a fairly small number of PIC cores.

    Are you looking for particularly tiny devices?, all those you list are 8 pin or less?. It really depends what you're wanting to do?, for learning purposes I would suggest the 16F628, or 16F88, or 16F819 - all easy to use 18 pin devices, all using the same 14 bit core - as do the 12F629 and the 12F675, which are 8 pin versions you could port to.
     
Thread Status:
Not open for further replies.

Share This Page