Oilmex PIC-MT-USB and PIC16F877A


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    Join Date
    Mar 2008
    Location
    Gerogetown, Texas
    Posts
    94


    Did you find this post helpful? Yes | No

    Default

    Robert

    HS is 20 Mhz crystal or resonator
    XT is 4 Mhz crystal or resonator

    Take a look at your chips data sheet, it will become your best friend. The section under oscillator configurations will tell all.

    Have fun

  2. #2
    Join Date
    Aug 2009
    Location
    Upstate New York
    Posts
    8


    Did you find this post helpful? Yes | No

    Thumbs up Oscillator Settings..

    I don't think I spend more than two hours going over 232 pages of 16F87X informaion, and still not not come back with a clue. It's a little overwhelming, but, now with the pointer to the XT, LP or HS modes, I can spend a couple of hours understanding that little bit.

    Then there is the thought that even if I knew I had to change to HS mode, I would not have a clue how to do that without the first post. Maybe that's in the manual for the compiler, but I have not come across it yet.

    With the help of this group, I am sure to gain wistom quicly.

    I was even able to talk to the LC display, so yep, I AM having fun!

  3. #3
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Hi taitny,
    OSC works sort of this way, remember the old axiom "speed costs money, how fast do you want to go" ? Sort the same here, "Speed costs energy, how fast do you want to go"?
    setting the OSC to XT gives the OSC less power to play with than HS does. and the settings that allow 32KC OCS give even less, generally you want HS if you go over 4mhz.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  4. #4
    Join Date
    Aug 2009
    Location
    Upstate New York
    Posts
    8


    Did you find this post helpful? Yes | No

    Smile Looking for Newbie Book on PIC / PICBASIC

    It makes sense that higher speed takes more power, and it's really cool that they built in the functionality to allow making the trade off between speed and power.

    If I had an idiot's guide to the .INC file, it might have saved me some head banging.

    Anyone recommend a book that covers the subject?

    The he code that DaveC3 sent, offers me food for thought, and it enabled me to get my program running. It would be great if I could find a guide that explains each element of each line (sure some of the info is in the device manual), but I am open to literature that might be able to impart wisdom.

    Cheers!

    Taitny

  5. #5
    Join Date
    Nov 2007
    Location
    South-West of Australia. A small town called Denmark. 'Where the forest meets the sea.'
    Posts
    136


    Did you find this post helpful? Yes | No

    Default Getting Started Olimex

    Hi,

    I started about 2 years ago - with a PIC16F877A and had partial success but kept coming across bits that I could not work out. So I:

    1. Got the simpler PIC16F84A chip.

    2. A 'development board' from Mikroelektronika (the EasyPIC5) - a bit pricey but it also handles the PIC16F877A. This has all the buttons, LEDs and other peripherals for quick learning/experimenting (get the LCD extra). It also minimises the chance of a wrong connection that can bugger up a learning session for days!

    Or, get the simpler board from Olimex 'PIC18 Board.' The name is a bit confusing because it caters for chips with 18 pins (like the PIC16F84A) not the PIC18F seriec of microcontrollers.

    3. Books that were helpful: 'Programming PIC Microcontrollers With PicBasic' by Chuck Hellebuyck. 'PicBasic Projects' by Dogan Ibrahim.

    4. Work through the exercises in the books.

    5. Work through the Microchip Spec for the PIC16F84.

    6. Download the Microchip integrated development environment (free) and do some assembler level programming to see the bits moving around.

    If the advice is misplaced - sorry.

    Regards Bill Legge

  6. #6
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by taitny View Post
    If I had an idiot's guide to the .INC file, it might have saved me some head banging.

    Anyone recommend a book that covers the subject?
    http://www.picbasic.co.uk/forum/showthread.php?t=11116

    I have said it before and I will say it again.

    Forget the books, read this forum ( the above link is a good start) and work through the samples on MeLabs web site. http://www.melabs.com/resources/samples.htm

    It seems that folks who have read the "book" still come here asking basic questions. So logic tells me the "book" is not much good. So you may as well start here on the forum and save some time.

    As for a starter PIC... Get one that has analog and comparators and learn how to use it. Turn the analog stuff off until you are ready for it. Starting off with an obsolete part does not make much sense. The 877A is a good place to start. It has plenty of I/Os for future bigger projects along with the analog when needed.

    Just my opinion.
    Good luck!!!
    Dave
    Always wear safety glasses while programming.

  7. #7
    Join Date
    Aug 2009
    Location
    Upstate New York
    Posts
    8


    Did you find this post helpful? Yes | No

    Question Mystery sending data through serial port.

    On my 4 MHZ dev board I can send serial data just fine.
    When I move the chip to the Oilmex board with 20 MHZ clock, I get higher bit characters.
    This is what "Hello World" looks Like with coming from the Olimex
    The data rate looks to be 2400 baud (based on Oscope), but I can't get normal ASCII out.

    åë«::
    ú
    åë«::
    ú
    åë«::
    ú
    åë«::
    ú


    Here is the code:
    ' PicBasic Pro program to send a string to the serial port
    ' the hardware serial port

    'DEFINE OSC 4 'Works fine with a 4 MHZ system

    DEFINE OSC 20
    'on a 4 MHZ system it sends out data at 480 Baud just fine
    DEFINE HSER_BAUD 2400 ' Select the baud rate
    'Sends out high order bits on 20 MHZ system



    loop:
    Hserout ["Hello World", 13, 10] ' Send text followed by carriage return and linefeed
    pause 1000
    Goto loop ' Do it all over again

    End



    Any suggestion on what i need to do to fix this strange output?

    Thanks!

  8. #8
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Does the new board have an inverter chip? MAX232 for example.
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. USB-FTDI[UM232R] with PIC16f877a
    By bjox in forum USB
    Replies: 1
    Last Post: - 23rd February 2008, 23:40
  2. Usb X Pic16f877a
    By LLEEDD in forum USB
    Replies: 2
    Last Post: - 30th December 2007, 22:52

Members who have read this thread : 0

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

Tags for this Thread

Posting Permissions

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