PDA

View Full Version : 16c72



Michael
- 18th June 2006, 19:08
I've written plenty of code, all with positive results using the 16C65B and
the 16F628A.

So I get some 16C72, along with a windowed chip and I can't get even the simplest lines of code to function.

Is there something I should know about these parts or any problems with
MCS, PBP and EPIC win programmer?

They all say they support the chip.

I mean I can't even toggle an input pin on PORTA and make a PORTB pin go hi/lo. ?

MCLR IS ON and using a supervisor on the mclr pin. 4 mhz osc.

wierd.

paul borgmeier
- 19th June 2006, 08:58
...I mean I can't even toggle an input pin on PORTA...

You have not given us much to work with ...

Have you added ADCON1 = 7 early on in your code (for the portA issue)?

Do you do a blank check after earasing your JW and get an ok?

What xtal/cap pair are you using and what configuration fuses have you set?

Do you have both Vss pins tied low?

Have you tried temporarily connecting pin 1 straight to 5V instead of your supervisor to make sure it is not your supervisor?

Can you post a code snippet showing what does not work?

Oh, why not use a 16F72?

Paul Borgmeier
Salt Lake City, Utah
USA

Michael
- 19th June 2006, 13:26
Hi Paul....I was thinking last night and have yet to look at it but....
this may be the problem.

I had some code already written for a 16C65 and wanted to use parts of it, so I
opened up that file in Micro code studio, changed the part to 16C72 and did a "save as" with a new file name.

Perhaps MCS won't let you do that?

It won't change all that header information regardless of what you do....so always start with a "new file"?

As far as ADCON1=7....I thought that most of the parts defaulted to inputs on PORTA and not ADC's?....so I just did a TRISA = %11111111

I have the damn flu or something today but I'm going to try and see if not doing a "new file" is it.

BobK
- 19th June 2006, 13:51
Hi Michael,

This may seem trivial but are you erasing the chips before you put them into the EPIC programmer? The "C" devices with windows must be erased with a UV eraser if I'm not mistaken. "F" type devices are flash memory and can be erased by the programmer. Perhaps this is causing you the problem.

BobK

paul borgmeier
- 19th June 2006, 14:20
Perhaps MCS won't let you do that?It will let you do that - I do it all the time but the registers, etc., must be correctly set.

I thought that most of the parts defaulted to inputs on PORTA and not ADC's? Not this one, PORTA defaults to mostly Analog but this does not explain your PortB not working

I'm going to try and see if not doing a "new file" is itIt's not it but good idea - just make the thing blink PORTB.0 and then add more stuff. If that does not work, try some of the other things noted earlier in this thread.

(sorry about the flu - yuck!)

Good Luck,
Paul Borgmeier
Salt Lake City, Utah
USA

Michael
- 19th June 2006, 15:30
Well, one thing that tells me I better go back to bed is that for the past 15 minutes I had PORTA.0 and PORT A.1 in the same line and wondered why it wouldn't compile. (note the space).

(idiot). (i feel like hell though)

But I just noticed something that I never noticed before in MCS as well.

Let's say you're working on some code for a 16C72 and you open up another file just to look at (without closing the 16C72 file).....and that file is for a 16C65B.

When you close the 16C65B file the 16C72 file has CHANGED TO 16C65B!

Huh ? You'd think the software would recognize what you've saved. ?

All else is fine.....I submit we don't archive this post!