Searching \ for 'Problem with 12c509 actually working.' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=problem+with+12c509
Search entire site for: 'Problem with 12c509 actually working.'.

Truncated match.
PICList Thread
'Problem with 12c509 actually working.'
1997\12\06@190821 by John A. Craft

flavicon
face
I bought several of the OTP parts of the 12C509.  I am using Picstart Plus,
with MPLAB-C 1.21.

Its a simple program that I have run on many different chips, but this one
just seems to sit there with no sign of pin change.

The issues (as I understand them)

       Set INTERNAL RC

       Set Internal Reset

      clear OPTION bit 5 and 6

       use the __TRIS macro to set bit 0 and 1 as outputs

      Whatelse is there?  I use the Pins a Output , but they never change.

       Is there something I need to know about this internal clock?  What is th
e
OSC Trim byte for?

       Thanks in advance

John Craft


John A. Craft                           (601)689-8100 Voice
Vice President, Sr. Analyst             (601)689-8130 Fax
Nation Computer Services, Inc.  http://www.ncs-ssc.com
MSAAP Bldg 9110                 spam_OUTcraftTakeThisOuTspamncs-ssc.com
Stennis Space Center, MS  39529

1997\12\07@051616 by wwl

picon face
On Sat, 6 Dec 1997 18:01:16 -0600, you wrote:

>I bought several of the OTP parts of the 12C509.  I am using Picstart Plus,
>with MPLAB-C 1.21.
>
>Its a simple program that I have run on many different chips, but this one
>just seems to sit there with no sign of pin change.
>
>The issues (as I understand them)
>
>        Set INTERNAL RC
>
>        Set Internal Reset
>
>       clear OPTION bit 5 and 6
>
>        use the __TRIS macro to set bit 0 and 1 as outputs
>
>       Whatelse is there?  I use the Pins a Output , but they never change.
>
>        Is there something I need to know about this internal clock?  What is the
>OSC Trim byte for?
Exactly that, i.e. to trim the oscillator to a nominal 4Mhz The first
instruction (at location 0) should be a MOVWF OSCCAL to load the
factory calculated value for the particular chip to the osccal
register. See earlier posts concerning erased cal values in JW parts.

Even without this, programs should still run, albeit at the wrong
speed.
    ____                                                           ____
  _/ L_/  Mike Harrison / White Wing Logic / .....wwlKILLspamspam@spam@netcomuk.co.uk  _/ L_/
_/ W_/  Hardware & Software design / PCB Design / Consultancy  _/ W_/
/_W_/  Industrial / Computer Peripherals / Hazardous Area      /_W_/

1997\12\07@110816 by J Nagy

flavicon
face
{Quote hidden}

You don't need to know anything about the OSCCAL value. If you do nothing
the chip will work, but not necessarily at 4MHz. On powerup, the chip
always executes a 'MOVLW' instruction, though, loading W with the
appropriate value for trimming the Osc. Your first instruction in your
program should always be 'MOVWF OSCCAL' when running with the internal RC.

       Jim

More... (looser matching)
- Last day of these posts
- In 1997 , 1998 only
- Today
- New search...