16F88 and external Oscillator


Closed Thread
Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2008
    Location
    Selm, Germany
    Posts
    116

    Thumbs up 16F88 and external Oscillator

    Have nice holidays and sort of!

    I built a project with a 18F1320 and a 16F88.
    The 18F1320 has an external oscillator with 20 MHz that goes to CLKI and should squeeze 20 MHz out of CLKO (RA6) which runs to the 16F88 CLKI Input (RA7) .
    Bothe have osc defines of 20 but the 16F88 runs waaay to slow (about 4 times slower than expcted).
    Made two simplest program to test both, therefore the defines are of old working programs which will be used for these PICs and this project, exept the osc things. But the 16F88 will measure engine temp and control via HPWM the electric water pump and send the temp via DEBUG to the 18F1320 which shows it (and other things) at the 4 Line LCD.
    Had the communication established via 16F88 and a 16F876A wich worked so i will get it going between 16F88 and 18F1320, with a little help of my friends, of course.
    I tried several external 16F88 defines like _FOSC_HS,_HS_OSC and other out of the Device Reference files.

    so maybe the define of the 18F1320 is wrong but that one works with the right speed.

    Please help if you like to.
    16F88TEST2.txt1320TEST1.txt

  2. #2
    Join Date
    Jan 2008
    Location
    Selm, Germany
    Posts
    116


    Did you find this post helpful? Yes | No

    Default Re: 16F88 and external Oscillator

    Hello all around!
    I tried to put a EAGLE schematic attachment into this and I got the answer "Invalid file". How do I convert an Eagle document? I have to save PBP docs into txt format to post them. Is there anything like for EAGLE ?
    regards
    Mugel

  3. #3
    Join Date
    Aug 2011
    Posts
    408


    Did you find this post helpful? Yes | No

    Default Re: 16F88 and external Oscillator

    In EC mode the clock out on RA6 is FOSC/4, so with 20MHz on CLKI, CLKO will be 5MHz

  4. #4
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,517


    Did you find this post helpful? Yes | No

    Default Re: 16F88 and external Oscillator

    To post the schematic, either make a screen dump and post the image or print/export to .pdf and post that.

    I was going to say exactly what tumbleweed just did so now I won't, but I'll say this:
    Is it an actual oscillator (not a crystal or resonator) then you should be able to drive both PICs directly from the output of the oscillator but check the datasheet for the oscillator, I believe you can use either HS or EC mode for this.

    /Henrik.

  5. #5
    Join Date
    Jan 2008
    Location
    Selm, Germany
    Posts
    116


    Did you find this post helpful? Yes | No

    Default Re: 16F88 and external Oscillator

    Hello Henrik,
    Iīll try to get the image. No didnīt work, had 8MB Picture max is 1 MB.

  6. #6
    Join Date
    Jan 2008
    Location
    Selm, Germany
    Posts
    116


    Did you find this post helpful? Yes | No

    Default Re: 16F88 and external Oscillator

    Old Farts and Computers,

    here we go...Name:  18F1320+16F88.bmp
Views: 267
Size:  345.8 KB

  7. #7
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,517


    Did you find this post helpful? Yes | No

    Default Re: 16F88 and external Oscillator

    OK, so it is a proper oscillator.
    Then just drive both PICs directly from it it. The way you have it now the second PIC will run at 1/4 the speed of the first one.

    Use .png instead of .bmp for images like this, much better!

    /Henrik.

  8. #8
    Join Date
    Jan 2008
    Location
    Selm, Germany
    Posts
    116


    Did you find this post helpful? Yes | No

    Default Re: 16F88 and external Oscillator

    Made several mistakes, killed one 18F1320 donīt know how , destroyed my PICKIT operating system, had to desolder and solder one 18F1320, BIG Mistake in the schematic: I had to use the lower 4 bits of PORTA and these begin at PORTA0 not PORTA1 . Put a resistor between 74HC14 and RB1 otherwise the PIC may be grilled.
    Changed config:
    #CONFIG
    CONFIG OSC = HS ;Clock out on RA6 :1/1 CLKI
    #ENDCONFIG
    now the second PIC gets the same frequency out of the first PIC. Checked it with a scope.

    Hardware seems to work (if nothing else is grilled) and I can jump into software.Name:  TESTBOARD1.png
Views: 239
Size:  445.7 KBName:  TESTBOARD2.png
Views: 248
Size:  463.9 KB

Similar Threads

  1. 20MHZ External Oscillator Settings
    By ShaneMichael in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 27th October 2011, 02:44
  2. how to configure external oscillator
    By itsssyam in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 17th March 2011, 13:15
  3. A question on defining the external oscillator
    By ozarkshermit in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 22nd November 2009, 15:31
  4. How to use an external oscillator
    By Mugelpower in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 5th February 2008, 15:19
  5. External oscillator and startup
    By RussMartin in forum General
    Replies: 4
    Last Post: - 17th March 2007, 02:53

Members who have read this thread : 1

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