Oilmex PIC-MT-USB and PIC16F877A


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    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

  2. #2
    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

  3. #3
    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.

  4. #4
    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!

  5. #5
    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.

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


    Did you find this post helpful? Yes | No

    Thumbs up Mystery sending data through serial port - DO'H

    Dave - it does NOT have the Max chip. The LAB-X1 DOES have the Max..

    I will ponder the ramificions of this.. I suspect setting parity to -1 is not the answer. Seemed to recall somehting about Invert in the compiler book .

    I went back to the book "Since the sereal transmission is sdone in hardware, it is not possible to set the levels to an invertes state to eleminate an RS-232 driver"

    I read that several times.. Suddenly it has meaning!

    It's got a FT232RL, wich convers USB to RS-232, no doubt with the right state. I tapped in after the chip directly to the MCU.

    Lookse like I need to add the MAX232, or switch development boards, although if you have a magic bullet, I am willing to listen..

    Thanks!

    Robert

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


    Did you find this post helpful? Yes | No

    Default

    No magic bullets... Mine are all Pb

    If you do not have a 232 chip and you feel adventerous it can be done with a transistor or two. Here is a good read. For that matter the whole site should be a must read for PICers.
    http://www.rentron.com/Micro-Bot/IR_Serial.htm

    When you order the 232 do not forget the capacitors that go with it.
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Wink No magic bullets...

    Thanks for the pointer to the IR Serial. I will probably play with the MAX chip just to gain wisdom, but I do have all the transistors and realted hardware to go the other route.

    Odd think, it was Pb bullets that got me going down the PIC path. A co worker replaced my analog discrete 7400 series logic trigger board with a 16 pin PIC. And added some great features.

    This is one of the photographs that resulted:
    http://www.ohbah.com/~rt/strobe/Sund...17-49-10-1.htm

    So I decided it was time for me to hang up my TTL cookbook and try the MCU route.

    With help from folks like you, it's been fun

    Thanks!

    Robert

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