Complete Noob at PIC16F74 - i have no clue

Discussion in 'Embedded Systems and Microcontrollers' started by ak360, Aug 14, 2009.

  1. ak360

    Thread Starter Member

    Jan 18, 2009
    10
    0
    Hi Guys,

    I have been searching and searching online for an answer but I cannot find one - I have a 20Mhz oscillator (X0-53B) and it has 4 Pins -
    1 = NC
    14 = VDD
    7 = GND
    8 = OUT


    Now this image is under the datasheet for the PIC16F74
    [​IMG]

    The crystal is connected to the OSC1 and OSC2 of the microcontroller - but i dont have 2 output pins on my oscillator - just ONE output pin:
    [​IMG]

    Which one of the pins do i connect to OSC1 and OSC2?



    another question - I am using PICBasic (basic language) to program my PIC. What are some of the initial commands you should write

    I know that I need to write DEFINE OSC 20 to tell the PIC that I am using a 20Mhz oscillator, but what other commands do I need?


    PLEASE HELP! :(
     
    • 1.JPG
      1.JPG
      File size:
      11.4 KB
      Views:
      63
    • 2.JPG
      2.JPG
      File size:
      17.9 KB
      Views:
      59
  2. russ_hensel

    Well-Known Member

    Jan 11, 2009
    818
    47
    Not familiar with the part, but it seems to be an oscillator not a crystal. I believe the pic can be configured to use an external oscillator and a clock in pin. See the spec sheet.
     
  3. ELECTRONERD

    Senior Member

    May 26, 2009
    1,146
    16
    I'm a noob too! :D When it comes to programming that is...
     
  4. n9352527

    AAC Fanatic!

    Oct 14, 2005
    1,198
    4
    Connect the output pin of the oscillator to OSC1 pin of the PIC. Leave the OSC2 floating.
     
  5. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    Your oscillator is a compleate IC oscillator. If you do as n9352527 suggest it should work fine. I have not worked with PIC for a while. It could be that have to set a bit in a register telling the PIC that you are using an external oscillator
     
  6. ak360

    Thread Starter Member

    Jan 18, 2009
    10
    0
    I am still having problems in configuring the PIC to tell it at which frequency I am running at. I am aware that it is address 2007h which controls this - the problem is I have no clue how to access this address.

    I am using PICBasic as the language - someone please help :(
     
  7. nanovate

    Distinguished Member

    May 7, 2007
    665
    1
    That looks like a CONFIG address. PICbasic should have a way to set the configuration bytes. If not then you can use MPLAB
     
Loading...