xtal problem.


Closed Thread
Results 1 to 7 of 7

Thread: xtal problem.

  1. #1
    Rhatidbwoy's Avatar
    Rhatidbwoy Guest

    Default xtal problem.

    I have PICBasic and I would like to know how you would define or declare in the program that you are using a xtal that is other than 4MHz

  2. #2
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    Rhatidbwoy, All you would do is place this define at the top of your program:

    DEFINE OSC 20 '20 Mhz
    DEFINE OSC 8 '8 Mhz

    Dave Purola,
    N8NTA

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    and don't forget the configuration fuse... See FAQ to know how to set them in the code.

    Usually.. XT = 4MHZ HS > 4 MHZ
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  4. #4
    Rhatidbwoy's Avatar
    Rhatidbwoy Guest


    Did you find this post helpful? Yes | No

    Default

    ok got it.

    the other thing is that I was speaking to a tech at Mechanique and he was talking about how the program does not really need that in it. That is the PICBasic using the MicroCode Studio. The one thing that I would have to do is to change the time constant commands by five when using a 20MHz Xtal

  5. #5
    Rhatidbwoy's Avatar
    Rhatidbwoy Guest


    Did you find this post helpful? Yes | No

    Default

    The other thing tha I would like to mention is that Define OSC 20 in PICBasic does not really give any other that error.

  6. #6
    Brewster's Avatar
    Brewster Guest


    Did you find this post helpful? Yes | No

    Default

    I just went through a similar problem trying to change crystal frequencies.
    This is what I found:

    DEFINE is only available in PicBasic PRO.

    In MicroCode Studio, you can change the oscillator type, XT, HS, R/C, etc.
    After you have clicked on "compile and program", the next box to come up is "meProg-......". Click on VIEW and then CONFIGURATION ( you might have to click CONFIGURATION twice). The meProgram screen will come up and you can make changes to the oscillator there.

    You will still have to compensate for a different oscillator frequency in your program.

    Good Luck
    Brewster............another newby

  7. #7
    Rhatidbwoy's Avatar
    Rhatidbwoy Guest


    Did you find this post helpful? Yes | No

    Default

    I got the whole xtal thing to go. I am using the intrc right now, but yes it is a program orientated thing in PICBasic.

    Thanks

    P.S. problems that I was having with everything to my project was the power supply in my computer. It died the other day.

Similar Threads

  1. Problem with ASM IRQ using FSR0 on PIC18F252
    By mytekcontrols in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 11th March 2008, 20:48
  2. 18F4550 XTAL Problem
    By Pesticida in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 22nd January 2008, 20:12
  3. USART Problem , but don't know where, in pc? or in PIC?
    By precision in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 15th July 2007, 08:12
  4. PicBasic Pro Math Problem??
    By Glen65 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th March 2006, 04:36
  5. 1 slave 1 master 1 MAX232 1 problem ?
    By SuB-ZeRo in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 31st July 2005, 22:59

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