Pic16f84(a) w/20 Mhz Osc Serin/out commands with PBC


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2006
    Posts
    5

    Wink Pic16f84(a) w/20 Mhz Osc Serin/out commands with PBC

    I saw how to make an adjustment for different clock osc in PBP with the "def osc" command. How do I do that with PBC? I bought a relay board with the 20Mhz already installed and I want to use Serin and Serout commands to talk to a pc. I saw that the 20Mhz was 5x faster than the 4 Mhz and therefore would increase the speeds by 5, but I can't match up baud rates. So is there a way to tell PBC that I am using a 20Mhz clock so that I can match up baud rates?

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Hi Richard,

    I don't use PBC, and this is only one of the reasons.

    PBC is made to work with PIC's running at 4mhz. There is no DEFINE OSC equivelent. If you want to run at a higher speed then EVERYTHING has to be adjusted manually.

    If you want a 1 second pause you have to PAUSE 5000.

    PULSIN's read 5 times longer.

    PULSOUT's are 5 times shorter

    SERIN/OUT become problems since the baud rate is selected by Mode numbers and can't be calculated for other baud rates.

    etc. etc.

    You might want to consider Upgrading to PBP.   Or, for $1.50, change the crystal back to 4mhz.
    <br>
    DT

  3. #3
    Join Date
    Feb 2006
    Posts
    5


    Did you find this post helpful? Yes | No

    Default

    Thanks Darrell. I wish I had understood the limitations of PBC a little better b4 I got into all of this. I'm working on my first Pic project. I started looking at the 8051's but ended up with Pic because I found more books about programming in Basic for Pics. My eyes glaze over when I look at assembly, especially more complex tasks like serial communications and pwm. I may eventually go the C route if I continue playing with Microcontrollers because there is so much code available in C. I'm fasinated by the power of Microcontrollers and the incredible range of things you can do with them. I wanted to take a good look at how to program them and build circuits for them without investing a whole lot of money in case I decided it wasn't for me. I started with John Iovines book, 'Pic Microcontroller Project Book' which is pretty easy reading as far as Pics go. John pushes PBC and actually states to not get the PBP version because of how it handles Peek and Poke. Thats where I made the wrong turn. The good news is that I played around with PBC enough to know that I need something more powerful and that I like it enough to invest the additional cash for PBP. Anyway, thanks for your help and I hope this thread proves helpful to other newbies like me.

  4. #4
    Join Date
    Feb 2006
    Posts
    5


    Did you find this post helpful? Yes | No

    Default

    BTW, Your instant interupts - revisited is AWSOME!!

    Thanks again!

Similar Threads

  1. 6 MHz Osc and PauseUSL errors
    By vk2tds in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 31st August 2007, 05:04
  2. with 40 MHZ osc serin2 not work
    By Pedro Santos in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 13th August 2006, 22:56

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