PIC24F08KL200 - No Crystal

Post Reply
Author
Message
Ghostatwar
Posts: 38
Joined: 16 Oct 2016 13:24

PIC24F08KL200 - No Crystal

#1 Post by Ghostatwar » 20 Jan 2020 22:19

Good day,

i was hoping someone could possible assist me.

we are looking at using the thunder click to make mobile lighting detectors.

we would like to use the PIC24F08KL200 however the devices will probably be dropped pretty often, so we will not be using a crystal. the devices will power up and check the status every so often.

the problem is i cant even get the pic to do the basics.

i suspect the problem is with my scheme setup.

i have attched my project to test an LED, have also tried using uart1 unsuccessfully.

Code: Select all

void main() {

 delay_ms(200);

  PORTAbits;
  TRISA = 0;                // Initialize PORTA as output
  TRISB = 0;                // Initialize PORTB as output


  LATA = 1;                 // Set PORTA to zero
  LATB = 1;                 // Set PORTB to zero


  while(1) {
    LATA = ~LATA;           // Invert PORTA value
    LATB = ~LATB;           // Invert PORTB value

    Delay_ms(1000);
  }
}
frequency = 8mhz
Attachments
test_pic24f08kl200.zip
(109.4 KiB) Downloaded 80 times

hexreader
Posts: 1785
Joined: 27 Jun 2010 12:07
Location: England

Re: PIC24F08KL200 - No Crystal

#2 Post by hexreader » 20 Jan 2020 22:56

Select internal oscillator in configuration settings....

Project
... Edit Project
.... Oscillator Selection (change to Fast RC Oscillator FRC)

Select OK

I do not own that Particular PIC, so I cannot test that this works.

Internal oscillator accuracy specification is +- 2% according to datasheet. That may cause unreliable UART operation, especially at higher baud rates. You can compensate using OSCTUNE register - but that requires some kind of temperature sensor and a lot of added complication.

No way would I attempt UART communications without crystal or ceramic resonator timing.

Maybe a ceramic resonator is the way to go, if shock resistance is important?

If you use ceramic resonator, then be aware that the cheaper ones are only accurate to about 0.7%. This might be good enough for UART, particularly at lower baud rates. More expensive resonators can be more accurate; perhaps 0.2% which would probably be reliable at all baud rates in most normal situations.
Start every day with a smile...... (get it over with) :)

Post Reply

Return to “dsPIC Compilers General”