CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

12F1822 MCLR input problem
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
hobiadami



Joined: 17 Oct 2006
Posts: 35
Location: City of Concrete

View user's profile Send private message Visit poster's website ICQ Number

PostPosted: Wed May 10, 2017 5:00 am     Reply with quote

The configuration/ID part of the ccs device programmer is always 3FF8.

I've erased the chip, then read the contents, the conf is 3FF8.

Programmed it with the above simple code, the conf is 3FF8.

When i open the config / ID part, for a very small fraction of a second I see some other code, then it changes to 3FF8.

I've plugged the erased 12F822 into the circuit with the single led and button. It behaves the same with the one programmed with the hex code.

I've erased the chip, then loaded it with the button-led code and reloaded the code from the chip. The code is there, it loads fine from the chip. the config is 3FF8. But does nothing when run.

(Is this 3FF8 ok for my conf settings above from the LST file?)

If i read an erased chip, it is really empty, no code.

I've programmed other 16F series pics for testing, they and their conf bits are programmed without problems.

Config is ticked under options at all times. Bulk erase before programming is ticked and use LVP is auto.

In device tab, at the bottom of the target chip table, VDD says 8.5V. Don't know if this is usual. The device is powered by the icd-64.
Ttelmah



Joined: 11 Mar 2010
Posts: 19195

View user's profile Send private message

PostPosted: Wed May 10, 2017 7:37 am     Reply with quote

No. 0x3FF8, is not OK. It is the erased state (all 1's).

Your chip is not programming. This is why it is behaving oddly....

Hopefully just a typing error and you mean 12F1822.

8.5v is spot on. Vpp for this chip is lower than many and is 8v min, 9v max. The programmer is generating exactly the ideal voltage (half way between min and max...). Vpp is not the supply voltage it is the higher voltage that has to be fed into the MCLR pin to 'trigger' programming.

Now the basic PIC's like this don't support device ID testing, so the programmer will not tell you if the device is not what it expects. However it is behaving as if this is the case. Can you source a chip from a completely different supplier?. Is there anyone else near you with a different PIC programmer?.

You may be unlucky and have bought some 'forged' PICs. Especially on chips like these, they are surprisingly common now. Alternatively there may be a compatibility problem between the ICD-U64 and these particular PICs with the current software.

------- Updated

It's worth just adding.
There is an important difference between 16F PICs and 12F PICs here.
16F PIC's have device ID's. The programmer will detect that the chip matches what it is being asked to program, and warn if it doesn't. The 12F PICs dor not have this feature.
Means you can/will get problems if you put a 'wrong' 12F chip into the programmer ans program it. There was a poster a while back here who has put in a wrong chip and this resulted in the clock calibration being erased.
Have you actually checked with a magnifying glass the part number of your chips?. Have you made sure the type number in the code (and in the programmer), matches?.
hobiadami



Joined: 17 Oct 2006
Posts: 35
Location: City of Concrete

View user's profile Send private message Visit poster's website ICQ Number

PostPosted: Wed May 10, 2017 12:30 pm     Reply with quote

when i read the programmed chip, i see the code but the config is wrong. so the config is not being programmed.

yes i mean 12F1822, typing mistake.

I didn't know there were "forged pics". If such chips are present then i'm sure it is what shops sell here. :(. The label on top of the chips say 12f1822 but i noticed they become hardly readable after several pushes into the breadboard. They get wiped off easily.

I'll go buy different chips from different shops tomorrow and ask a friend with a different programmer to do a test program for me. or maybe buy a new programmer to do the test myself. but the programmers are forged as well, all clones . ahh


Last edited by hobiadami on Wed May 10, 2017 3:43 pm; edited 1 time in total
Ttelmah



Joined: 11 Mar 2010
Posts: 19195

View user's profile Send private message

PostPosted: Wed May 10, 2017 12:45 pm     Reply with quote

The commonest forgeries are 're-badges'. So a very cheap chip like the 12F508, which has the label ground off, and then remarked as a more expensive model. This is the commonest type of flash memory forgery, with chips having their electronic ID re-programmed so they report as (say) 32GB, when they are actually 4GB. These then apparently work, till the amount of data overflows the small area that is really available...

Then 'rejects'. These are chips scavenged from the manufacturers scrap, and sold. Most manufacturers now destroy these to avoid this.

Then outright forgeries.....

<http://www.aeri.com/counterfeit-electronic-component-detection/>
<https://www.maximintegrated.com/en/app-notes/index.mvp/id/5458>

The markings on a normal PIC are quite faint, but they are normally laser engraved into the surface, so will not rub off.
hobiadami



Joined: 17 Oct 2006
Posts: 35
Location: City of Concrete

View user's profile Send private message Visit poster's website ICQ Number

PostPosted: Thu May 11, 2017 2:23 am     Reply with quote

these are the chips i use with no luck

https://www.dropbox.com/s/uqknfc76ha949go/WIN_20170511_11_18_40_Pro.jpg?dl=0
Ttelmah



Joined: 11 Mar 2010
Posts: 19195

View user's profile Send private message

PostPosted: Thu May 11, 2017 4:35 am     Reply with quote

I'm afraid I'm rather suspicious of these....

Identical numbering, including the traceability code & manufacture date, yet the packages have different size pin 1 ID dimples on three of them, and the texture of the plastic also differs. Normally if the codes are identical, the chips should be absolutely identical in appearance. The labelling on the bottom right one, is also further from the right edge of the chip than on the others.
hobiadami



Joined: 17 Oct 2006
Posts: 35
Location: City of Concrete

View user's profile Send private message Visit poster's website ICQ Number

PostPosted: Thu May 11, 2017 5:12 am     Reply with quote

You are absolutely right.

The pin 1 dots size are different also because somebody probably have put them down, label first on a belt sender to clear off the old labels. Even the sanding traces are visible on the chips when inspected carefully.

Today i went to the shops and asked the guy i've bought these from whether they are ok and not fake chips. Surely, he swore to god they were and told me he had already sold 10s of thousands of them without problems. Also said there should be a problem with my programmer :D

I went to an other shop and bought smd types this time. soldered one of them onto an adapter pcb and tested under same conditions.

https://www.dropbox.com/sh/gaewycydk2xxze5/AABKLKhBMCSeMAksy5WF0Vj3a?dl=0

and, the same thing happened. The device behaves as if not programmed and the config bits are 03FF8. The same :(
Ttelmah



Joined: 11 Mar 2010
Posts: 19195

View user's profile Send private message

PostPosted: Thu May 11, 2017 7:33 am     Reply with quote

First the chips may have damaged the programmer...
Second do these have the same code markings?.
hobiadami



Joined: 17 Oct 2006
Posts: 35
Location: City of Concrete

View user's profile Send private message Visit poster's website ICQ Number

PostPosted: Mon May 22, 2017 6:30 am     Reply with quote

Today a new pickit 3 arrived by post and I've tried to program the same 12F1822 chips with it. And they worked.

Seems like my icd-64 is not able to program the 12f1822 configuration words.
Although it programs 12F683 chips without any problem.

The end result of this post is that i've had a semi-failing programmer.

Thanks for your help and time.
Best regards.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group