'Problem with 12c509 actually working.'
John A. Craft
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
OSC Trim byte for?
Thanks in advance
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 ncs-ssc.comcraft
Stennis Space Center, MS 39529
|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
_/ L_/ Mike Harrison / White Wing Logic / netcomuk.co.uk _/ L_/ wwl
_/ W_/ Hardware & Software design / PCB Design / Consultancy _/ W_/
/_W_/ Industrial / Computer Peripherals / Hazardous Area /_W_/
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.
More... (looser matching)
- Last day of these posts
- In 1997
, 1998 only
- New search...