dsPIC30F6010A + OSCCON write protection

Gast #1827996
Lesenswert?

Hallo,

ich habe einen dsPIC30F6010A und will den internen FRC oszillator mit 
PLL x16 verwenden.

Wenn man im CCSC compiler als FUSE FRC_PLL16 eingibt kommt folgender 
Fehler:

"The configuration bits are invalid and might cause problems if 
programmed. do you want them to set them to the default value?"

config field FOSFPR

yes / no"

bei "no" bleibt bleibt PLL deaktiviert, bei "yes" tut sich nichts.

D.h. will ich die Register selbst setzen.

OSCCON ist eine 16 bit register.

Im Datenblatt
http://ww1.microchip.com/downloads/en/devicedoc/70150a.pdf
auf S.155 steht folgendes:

"To write to the OSCCON high byte, the following
instructions must be executed without any other
instructions in between:

Byte Write “0x78” to OSCCON high
Byte Write “0x9A” to OSCCON high"


Meine Frage: wie kann ich von einem 16 Bit Register nur das high byte 
beschreiben?

danke,

lg clemy
Gast #1828331
Lesenswert?

danke für deine hilfe,

leider funktioniert es so nicht.

kann es sein das folgende deklaration richtig ist:

#word OSCCON = 0x0742   //Oscillator Control Register

#byte OSCCONL = 0x0742
#byte OSCCONH = 0x0743



Da im p30f6010A.inc file folgendes steht:
         .equiv OSCCONL, _OSCCON
         .equiv OSCCONH, _OSCCON+1



lg clemy

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren