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
    The bathroom fan project will only require a small PIC, I suppose I haven't thought about anything else at the moment.

    I could just buy a few of the eight pin variety, I need a few just in case I destory some of them, then a few more of the 14 and 18 pin varieties.

    I'm just no fan of drilling holes and would also rather pay less than more, I don't like the idea of using a PIC with 18 pins when an eight pin PIC would do.
     
  2. eng1

    eng1 New Member

    Joined:
    Apr 7, 2006
    Messages:
    951
    Likes:
    19
    Location:
    Italy
    The PIC12C508A is an OTP device, not recommended.
    The PIC12F508 looks good for your project, but it's not loaded with peripherals - that might become useful for future projects (ADCs, PWM) - and has a two levels stack. I would buy some PIC12F683s too (my personal favourite).
     
  3. Gayan Soyza

    Gayan Soyza Active Member

    Joined:
    Oct 23, 2006
    Messages:
    1,822
    Likes:
    19
    Location:
    Colombo
    You are going to make a Bathroom Extractor Fan Timer. After completing, the PIC must there permanent. So a FLASH based chip for that job would pointless. It can replace by an 8 pin OTP chip.

    Due to very first time programming it must done with a FLASH based chip formatting over 100 of times to get the final output. After that can be converted to an OTP device. If you still don’t like then can replace the chip with a FLASH based one.

    Looking at your requirement deeply

    Pull the switch once – TURN ON output for 10 mins
    Pull twice – TURN ON continuously
    Pull again - TURN OFF

    When it pulls ONCE within the 10 minutes time period what will happen? Does it continuous the timer or else?

    When it pulls TWICE within the 10 minutes time period what it needs to do or do nothing?

    For additional it will be good if you place 2 LED’s – one for 10 mins timer running & other for continuous running. Due to false input given by the user.

    This small small things very useful when programming microcontrollers.
     
  4. dave

    Dave New Member

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


     
  5. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,324
    Likes:
    653
    Location:
    Derbyshire, UK

    That would make sense for production purposes, but for a 'one of', or just a small quantity, you may as well just stick to the FLASH chip, the difference in price is only small.

    Even if you were moving to an OTP, you really need a UV eraseable one in order to do the changes required for the OTP, and to avoid wasting them.

    But mostly pointless these days, use the FLASH chip!.
     
  6. eng1

    eng1 New Member

    Joined:
    Apr 7, 2006
    Messages:
    951
    Likes:
    19
    Location:
    Italy
    When you program OTP devices you must be sure that your program works as you expect as you can't make any changes. Even expert programmers often need to modify/update their programs.
    Don't waste your time and money with OTP microcotrollers.
     
  7. pc88

    pc88 New Member

    Joined:
    Jun 6, 2007
    Messages:
    179
    Likes:
    3
    Location:
    Minneapolis, MN
    Hi,

    I was wondering if the PIC gurus here could bring me up to speed on how
    development works in the PIC world. I have a lot of experience for AVRs but
    none with PICs.

    In particular, I was curious if PICs have in-circuit programming capability. For
    instance, I've done all my AVR programming with the programmer described
    here:

    http://www.milkcrate.com.au/sensing/programmer.html

    and I can program the uC while it is in the application circuit. Can the same
    be done with PICs (or certain model PICs)? I have used uC's and programmers
    that required you to remove the uC from the application board and re-insert it
    after programming it, but it was too tedious and I fried too many chips. ICP
    (in-circuit programming) is much, much more convenient.

    Thanks!
     
  8. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,324
    Likes:
    653
    Location:
    Derbyshire, UK
    The vast majority of PIC's allow ICSP, where do you think Atmel copied it from for the AVR? :D
     
  9. Hero999

    Hero999 Banned

    Joined:
    Apr 6, 2006
    Messages:
    14,902
    Likes:
    79
    Location:
    England
    Exactly and being a nube to PICs I'm likely to mess it up the first time round so ruining a load of OTP devices would prove more expensive than re-erasing and re-programming one device.

    I can put up with UV erasable because I do have a germicidal tube lying around but a FLASH unit would be more convenient.
     
  10. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    There is no good reason to use OTP devices except in mass production where saving a few cents on each unit adds up to big dollars.

    EPROM is just out and out outdated. There may be some corner case where it is a good solution but I do not know about it.

    See Disclaimer Below.

    Regarding the PIC development cycle.

    Build->Program->Run

    or

    Build->Program->Debug (ICD vis ICSP)
     
    Last edited: Jun 25, 2007
  11. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,324
    Likes:
    653
    Location:
    Derbyshire, UK
    Have you seen the price of the JW PIC's though!.
     
  12. Gayan Soyza

    Gayan Soyza Active Member

    Joined:
    Oct 23, 2006
    Messages:
    1,822
    Likes:
    19
    Location:
    Colombo
    The OTP devices I mean about C based chips Ex: The Historic 12C508A…..

    Bathroom Extractor Fan Timer it’s a good product for the market too.:rolleyes:

    But the price different between C & Flash based ones becomes closer as earlier mentioned.

    But I’m greedy about that Remaining FLASH Cycles LOL :D :D :D
     
  13. Hero999

    Hero999 Banned

    Joined:
    Apr 6, 2006
    Messages:
    14,902
    Likes:
    79
    Location:
    England
    I see your point, yes flash is a waste of money if you're only going to program it once but I've decided to go for the PIC10F200-I/P as it's cheaper than the OTP unit from Maplins an at only six pins I won't have to drill many holes or do much soldering.:D

    If the user pulls the cord once within half a second whilst the fan is off the timer will be activated.

    If the user pulls the cord twice within half a second whilst the fan is of the continious mode will be operated.

    If the user pulls the cord whilst the fan is on and the 0.5 second delay looking for a second pull has finished the fan is switched off.

    Here's some heavilly simplified pseudo code:
    Code (text):

    Do
     Fan off
     If cord pull then
      Turn fan on
      If no cord pull within 0.5s then
       Set timer to 10min
      Else
       Set timer to 1day
      End if
      If cord pulled before time delay over then turn fan off
     End if
    Loop
     
    If you notice from my code, I've decided not to have a continious mode but to turn the fan on for a longer time period like a day, this is good as it means that if you go on holiday and forget to turn it off then it won't be on for too long. I might also make the on delay longer, it depends on how long it takes to clear a smell from the bathroom, I'll experiment with some cheap and nasty perfume.:D

    By the way, this is probably a silly question but can this programer program other programmable chips like PLAs?

    Also what about SMT PICs, is there an adaptor I can buy that I can attach the ZIF to program SMDs?
     
  14. eng1

    eng1 New Member

    Joined:
    Apr 7, 2006
    Messages:
    951
    Likes:
    19
    Location:
    Italy
    The PIC10F200-I/P is in a PDIP-8 package. Check the "Product Identification System" in the datasheet.
     
  15. Gayan Soyza

    Gayan Soyza Active Member

    Joined:
    Oct 23, 2006
    Messages:
    1,822
    Likes:
    19
    Location:
    Colombo
    I’m not familiar with PLA systems. But P16PRO40 supports to many chips including some 18F series. Unfortunately I couldn’t build this programmer because I don’t have a LPT port in my MB.I have some LVP programmers. See the supported devices in WINPIC site http://www.winpicprog.co.uk/supported.htm

    There are some SMT to DIP adaptors as well. For more information see this link.
    http://smt-adapter.com/Site/SMT-connector-adapters.htm
     
  16. Hero999

    Hero999 Banned

    Joined:
    Apr 6, 2006
    Messages:
    14,902
    Likes:
    79
    Location:
    England
    What's the difference between a PDIP and a DIP?

    Oh well I don't mind soldering eight holes although packaging a six pin device in an eight pin package seems a bit pointless to me.

    Programmable Logic Array (PLA) is a type of Programmable Logic Device (PLD), they were invented to replace 1000s of logic gates and flip-flops in logic circuits.

    http://en.wikipedia.org/wiki/Programmable_logic_device

    Parallel port cards are pretty cheap; you could probably get one for free from a trash PC.

    Wow they're expensive!

    I take it that they're not solderless either?

    I'm after something solderless, you just clip the part to the PCB, plug it into the ZIF socket and away you go!
     
  17. eng1

    eng1 New Member

    Joined:
    Apr 7, 2006
    Messages:
    951
    Likes:
    19
    Location:
    Italy
    No difference, PDIP = Plastic DIP
    I was pointing out that the PIC10F200-I/P has eigth pins, if you're going to design the board. Instead, if you want the 6 pin version, you have to order the PIC10F200-I/OT, that comes in the SOT-23 package.
     
    Last edited: Jun 27, 2007
  18. Hero999

    Hero999 Banned

    Joined:
    Apr 6, 2006
    Messages:
    14,902
    Likes:
    79
    Location:
    England
    I wouldn't mind the SOT-23 package if there's a way I can adapt my ZIF socket to take it.
     
  19. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    The best would be to use the ICSP connector on your programmer hooked to an ICSP connector on your target.:)

    Or just solder the 3 ICSP wires to pads on the target board and insert the other end into the ZIF.
    Maybe 2 more for power and GND. Take the wires off when the board is finished.

    May be less painful to use the 8 pin DIP.
     
    Last edited: Jun 28, 2007
  20. eng1

    eng1 New Member

    Joined:
    Apr 7, 2006
    Messages:
    951
    Likes:
    19
    Location:
    Italy
    These are the best solutions :) IIRC the PIC10F200 has a 'strange' pin layout. In other words, even if he chooses the PDIP8 version, it can't be programmed in the socket. Another reason to prefer a PIC12Fxxx ?
     
    Last edited: Jun 28, 2007
  21. Hero999

    Hero999 Banned

    Joined:
    Apr 6, 2006
    Messages:
    14,902
    Likes:
    79
    Location:
    England
    So even if I by the eight pin package it can't be programmed in the socket?

    That's pretty stupid.

    Going back to what you said earlier:
    I forgot that RS sell the PIC12F508-I/SN £0.62 so, decision made, I'll go for it!

    I'm not going to put the order in too quickly though (Corby is a bit of a drive); I'll wait untill there are quite a few things I need before I go.
     
Thread Status:
Not open for further replies.

Share This Page