PIC with 100 kHz crystal


Closed Thread
Results 1 to 3 of 3
  1. #1

    Default PIC with 100 kHz crystal

    I have a need for the lowest possible power draw. I think I can get away with a 100 KHz crystal and still get around the main loop in time. The defines for PBP stop at 3.58 or 4 MHz. There are no LCDs or serial datacomms to worry about.

    I realise the bootloader can't work and I want to use ICSP via a modified EPIC for code load and dump.

    Questions.
    Can I use PBP with DEFINE OSC 4 and then fudge any timing loops by calling up a delay of 1/40th of what is needed? (4 MHz/40 = 100 KHz). For example calling up PAUSEUS 25 would in fact become a pause of 1 mSec.

    Are there any other hidden little gotchas I should be aware of?

    BrianT

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by BrianT View Post
    I have a need for the lowest possible power draw. I think I can get away with a 100 KHz crystal and still get around the main loop in time. The defines for PBP stop at 3.58 or 4 MHz. There are no LCDs or serial datacomms to worry about.
    I realise the bootloader can't work and I want to use ICSP via a modified EPIC for code load and dump.
    Questions.
    Can I use PBP with DEFINE OSC 4 and then fudge any timing loops by calling up a delay of 1/40th of what is needed? (4 MHz/40 = 100 KHz). For example calling up PAUSEUS 25 would in fact become a pause of 1 mSec.
    Are there any other hidden little gotchas I should be aware of?
    BrianT
    You can do exactly what you're talking about.
    I do it on my '4620 on my OBD reader. The code I wrote has DEFINE OSC 10, which means it talks to my OBD chip at 9,600. If I turn on the 4xPLL when I program the chip, it'll talk to the OBD chip at 38,400, without changing any code.
    And it works just fine, except that the pause loops get a little bit goofy and you have to program them all for worst case scenario.

  3. #3


    Did you find this post helpful? Yes | No

    Default

    ICSP is not dependant on defines, osc speed, or coding. The clock is generated by the programmer, and the micro is not running code while being programmed. ( In short, ICSP will not be affected and will work fine no matter what speed or defines you have)

    There's many commands that are based on the actual osc speed and define osc has no effect. (pulsein and pulseout for example, the resolution is directly related to osc speed. the define osc is of no use for these)

Similar Threads

  1. My code for TV remote and MIBAM for RGB control
    By idtat in forum Code Examples
    Replies: 4
    Last Post: - 12th January 2013, 20:52
  2. Crystal osc running but PIC not using it
    By p15218 in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 18th February 2007, 22:33
  3. More than one Pic to one crystal?
    By Jcee324 in forum Schematics
    Replies: 2
    Last Post: - 19th July 2006, 19:40
  4. Need send 1 khz signal from pic
    By irmus in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 31st January 2006, 19:52
  5. Serial Pic to Pic using HSER
    By Chadhammer in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th March 2005, 23:14

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts