camerart Well-Known Member Jun 17, 2018 #1 Hi, Can someone put this through the Oshonsoft SIM, please. I can't get the Start up LEDs to flash at 1 sec ON/OFF. Thanks. Camerart Attachments 18LF2520 INT4MHz SIMPLE SERVO LOOP 160618 1700.bas 1.4 KB · Views: 337
Hi, Can someone put this through the Oshonsoft SIM, please. I can't get the Start up LEDs to flash at 1 sec ON/OFF. Thanks. Camerart
Ian Rogers User Extraordinaire Forum Supporter Most Helpful Member Jun 17, 2018 #2 Correct!! I get 3.972 seconds... Something is amiss... I'll take a look see.
Ian Rogers User Extraordinaire Forum Supporter Most Helpful Member Jun 17, 2018 #3 Okay... Swapping OSC = HS to OSC = XT brings it back to 1 second..
J jjw Active Member Jun 17, 2018 #4 camerart said: Hi, Can someone put this through the Oshonsoft SIM, please. I can't get the Start up LEDs to flash at 1 sec ON/OFF. Thanks. Camerart Click to expand... If you are using the internal oscillator, then you have to set the frequency to 4Mhz in OSCCON register. Define clock_frequency = 4 only tells the compiler what the frequency is to be used in waitus, waitms delays, not to set it.
camerart said: Hi, Can someone put this through the Oshonsoft SIM, please. I can't get the Start up LEDs to flash at 1 sec ON/OFF. Thanks. Camerart Click to expand... If you are using the internal oscillator, then you have to set the frequency to 4Mhz in OSCCON register. Define clock_frequency = 4 only tells the compiler what the frequency is to be used in waitus, waitms delays, not to set it.
camerart Well-Known Member Jun 18, 2018 #5 Hi I and J, If I set OSCCON, do I also need to set OSC = XT? Thanks both, C.
J jjw Active Member Jun 18, 2018 #6 camerart said: Hi I and J, If I set OSCCON, do I also need to set OSC = XT? Thanks both, C. Click to expand... No, if you use the internal oscillator. In the program there is no code for the oscillators frequency setting.
camerart said: Hi I and J, If I set OSCCON, do I also need to set OSC = XT? Thanks both, C. Click to expand... No, if you use the internal oscillator. In the program there is no code for the oscillators frequency setting.
Ian Rogers User Extraordinaire Forum Supporter Most Helpful Member Jun 18, 2018 #7 No... You need to set it to internal clock... Can't remember the setting!