# PIC Programmer.

Status
Not open for further replies.

#### Hero999

##### Banned
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.

#### eng1

##### New Member
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).

#### Gayan Soyza

##### Active Member
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.

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.

#### Nigel Goodwin

##### Super Moderator
Gayan Soyza said:
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.
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!.

#### eng1

##### New Member
Gayan Soyza said:
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.
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.

#### pc88

##### New Member
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!

#### Nigel Goodwin

##### Super Moderator
The vast majority of PIC's allow ICSP, where do you think Atmel copied it from for the AVR?

#### Hero999

##### Banned
Nigel Goodwin said:
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!.
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.

#### 3v0

##### Coop Build Coordinator
Forum Supporter
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:

#### Nigel Goodwin

##### Super Moderator
Hero999 said:
I can put up with UV erasable because I do have a germicidal tube lying around but a FLASH unit would be more convenient.
Have you seen the price of the JW PIC's though!.

#### Gayan Soyza

##### Active Member
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.

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

But I’m greedy about that Remaining FLASH Cycles LOL

#### Hero999

##### Banned
Gayan Soyza said:
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.
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.

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.
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:
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.

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?

#### eng1

##### New Member
Hero999 said:
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.
The PIC10F200-I/P is in a PDIP-8 package. Check the "Product Identification System" in the datasheet.

#### Gayan Soyza

##### Active Member
Hero999 said:
By the way, this is probably a silly question but can this programer program other programmable chips like PLAs?
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

Hero999 said:
Also what about SMT PICs, is there an adaptor I can buy that I can attach the ZIF to program SMDs?

#### Hero999

##### Banned
eng said:
The PIC10F200-I/P is in a PDIP-8 package. Check the "Product Identification System" in the datasheet
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.

Gayan Soyza said:
I’m not familiar with PLA systems.
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

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[/url]
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!

#### eng1

##### New Member
Hero999 said:
What's the difference between a PDIP and a DIP?
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:

#### Hero999

##### Banned
I wouldn't mind the SOT-23 package if there's a way I can adapt my ZIF socket to take it.

#### 3v0

##### Coop Build Coordinator
Forum Supporter
Hero999 said:
I wouldn't mind the SOT-23 package if there's a way I can adapt my ZIF socket to take it.
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:

#### eng1

##### New Member
3v0 said:
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.
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:

#### Hero999

##### Banned
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:
eng1 said:
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).
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.

Status
Not open for further replies.