RCU Forums - View Single Post - New CDI - opensource project JMJ and Bigboat
Old 05-13-2010 | 11:28 AM
  #1231  
Bigboat
Senior Member
 
Joined: Dec 2005
Posts: 548
Likes: 0
Received 0 Likes on 0 Posts
From: Alkmaar, NETHERLANDS
Default RE: New CDI - opensource project JMJ and Bigboat

@Charlie,

Wat code is this ?

OSCCON = 0b01100111; // internal OSC set to 4MHZ

I can't find anything about this code into the datasheet.

Code:
 bit 7 Unimplemented: Read as ‘0’
 bit 6-4 IRCF<2:0>: Internal Oscillator Frequency Select bits
 111 = 8MHz
 110 = 4 MHz (default)
 101 = 2MHz
 100 = 1MHz
 011 = 500kHz
 010 = 250kHz
 001 = 125kHz
 000 = 31 kHz (LFINTOSC)
 bit 3 OSTS: Oscillator Start-up Time-out Status bit(1)
 1 = Device is running from the external clock defined by FOSC<2:0> of the Configuration Word register
 0 = Device is running from the internal oscillator (HFINTOSC or LFINTOSC)
 bit 2 HTS: HFINTOSC Status bit (High Frequency – 8 MHz to 125 kHz)
 1 = HFINTOSC is stable
 0 = HFINTOSC is not stable
 bit 1 LTS: LFINTOSC Stable bit (Low Frequency – 31 kHz)
 1 = LFINTOSC is stable
 0 = LFINTOSC is not stable
 bit 0 SCS: System Clock Select bit
 1 = Internal oscillator is used for system clock
 0 = Clock source defined by FOSC<2:0> of the Configuration Word register
BTW, if we use this pins as programmed we can't use rs232 communication in the future and for now no incircuit programming.