camerart Well-Known Member Aug 31, 2018 #1 Hi, Looking at the Data sheet for 18LF2520 PIC, it shows the highest speed crystal as 25MHz. I only have 32MHz, will they work ok? Camerart.
Hi, Looking at the Data sheet for 18LF2520 PIC, it shows the highest speed crystal as 25MHz. I only have 32MHz, will they work ok? Camerart.
Ian Rogers User Extraordinaire Forum Supporter Most Helpful Member Aug 31, 2018 #2 I don't think so.... The max speed of this is 40Mhz but 10Mhz (4x) PLL.. So 32Mhz should only be an 8 Mhz crystal with the PLL.. I don't think a 32Mhz crystal would stabilize.... This is just in my opinion...
I don't think so.... The max speed of this is 40Mhz but 10Mhz (4x) PLL.. So 32Mhz should only be an 8 Mhz crystal with the PLL.. I don't think a 32Mhz crystal would stabilize.... This is just in my opinion...
camerart Well-Known Member Aug 31, 2018 #3 Ian Rogers said: I don't think so.... The max speed of this is 40Mhz but 10Mhz (4x) PLL.. So 32Mhz should only be an 8 Mhz crystal with the PLL.. I don't think a 32Mhz crystal would stabilize.... This is just in my opinion... Click to expand... Hi R, Ok, that's a shame. Anyone want 20x32MHz crystals? C.
Ian Rogers said: I don't think so.... The max speed of this is 40Mhz but 10Mhz (4x) PLL.. So 32Mhz should only be an 8 Mhz crystal with the PLL.. I don't think a 32Mhz crystal would stabilize.... This is just in my opinion... Click to expand... Hi R, Ok, that's a shame. Anyone want 20x32MHz crystals? C.
camerart Well-Known Member Aug 31, 2018 #4 Hi, On re-reading the Data sheet, I think the PIC will work without a crystal. I've tried setting OSCCON and PLL, but 18LF2520 does appear to be running correctly. Can anyone supple the OSCCON and PLL settings for 8MHz and X4 please. C
Hi, On re-reading the Data sheet, I think the PIC will work without a crystal. I've tried setting OSCCON and PLL, but 18LF2520 does appear to be running correctly. Can anyone supple the OSCCON and PLL settings for 8MHz and X4 please. C
Ian Rogers User Extraordinaire Forum Supporter Most Helpful Member Aug 31, 2018 #5 You need to set OSCCON to 0x70 ( 8Mhz) and set the PLL bit in the config register.. I think there is a software bit aswell. So config FOSC= INTIO2 and PLLEN = 1 Then OSCON = 0x70 Then OSCTUNE bit 6 needs to be 1.
You need to set OSCCON to 0x70 ( 8Mhz) and set the PLL bit in the config register.. I think there is a software bit aswell. So config FOSC= INTIO2 and PLLEN = 1 Then OSCON = 0x70 Then OSCTUNE bit 6 needs to be 1.
camerart Well-Known Member Sep 1, 2018 #6 Hi I, I think I've got it set correctly, but it's too fast. Can you try it in the simulator please. The SIM is a bit faster than the PCB, but still shows too fast. There is no INTIO1 and 2 option. I used this: Thanks, C. Attachments INTOSC.jpg 181 KB · Views: 284 18LF2520 8MHz 2XPIC SERVO X6 010918 0830.bas 3.3 KB · Views: 287
Hi I, I think I've got it set correctly, but it's too fast. Can you try it in the simulator please. The SIM is a bit faster than the PCB, but still shows too fast. There is no INTIO1 and 2 option. I used this: Thanks, C.
J jjw Active Member Sep 1, 2018 #7 camerart said: Hi I, I think I've got it set correctly, but it's too fast. Can you try it in the simulator please. The SIM is a bit faster than the PCB, but still shows too fast. There is no INTIO1 and 2 option. I used this: Thanks, C. Click to expand... What is too fast? Waitus 1000? Define clock_frequency 8 -> change to 32
camerart said: Hi I, I think I've got it set correctly, but it's too fast. Can you try it in the simulator please. The SIM is a bit faster than the PCB, but still shows too fast. There is no INTIO1 and 2 option. I used this: Thanks, C. Click to expand... What is too fast? Waitus 1000? Define clock_frequency 8 -> change to 32
camerart Well-Known Member Sep 1, 2018 #8 jjw said: What is too fast? Waitus 1000? Define clock_frequency 8 -> change to 32 Click to expand... Hi I, Changed to 32, that did it I wondered about that. Thanks, C.
jjw said: What is too fast? Waitus 1000? Define clock_frequency 8 -> change to 32 Click to expand... Hi I, Changed to 32, that did it I wondered about that. Thanks, C.