microcontroller thread #3

Discussion in 'General Science & Technology' started by cato, Jul 19, 2006.

Thread Status:
Not open for further replies.
  1. leopold Valued Senior Member

    Messages:
    17,455
    if it will fit your laptop it should be fine.
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. leopold Valued Senior Member

    Messages:
    17,455
    LCD's do not have a programming language.

    LCD's operate on digital ones and zeros

    the most obvious reason you cannot find any tutorials in C/C++ is because most actuators are analog based with some being digital.
    unless the situation has changed drasticly your I/O chip will be programmed in assembly language.
    the chips i am familiar with operate on bytes
    for example you would send the chip a control byte to configure it
    the chip will put a byte on the data bus or it will latch a byte off the bus

    like i said unless the situation has changed you will need to learn assembly for your pic
     
  4. Google AdSense Guest Advertisement



    to hide all adverts.
  5. cato less hate, more science Registered Senior Member

    Messages:
    2,959
    there are several compilers out there that can turn C into assembly. I did it all last semester with the 68hc11 I was working with. what I meant was, it was hard to see what operations the person's program were performing without understanding the language.
     
  6. Google AdSense Guest Advertisement



    to hide all adverts.
  7. cato less hate, more science Registered Senior Member

    Messages:
    2,959
    hmm, I think I figured out a project. I think I will try and make an autonomously guided vehicle, on a small scale. unless you guys have a better way, I was thinking about making the little robot-car have a directional antenna, that would rotate, and 2 NDBs (non-directional beacons) to allow triangulation of position. I could narrow the width of the antenna down really far, so I could get a precise measurement of the two signals.

    what do you think?
     
  8. MetaKron Registered Senior Member

    Messages:
    5,502
    I think that three beacons would be better. You could also use a pair of dipole antennas at right angles to each other so you don't have to deal with the rotating mechanism.
     
  9. leopold Valued Senior Member

    Messages:
    17,455
    you could feed one dipole a certain frequency and the other a different frequency.
     
  10. MetaKron Registered Senior Member

    Messages:
    5,502
    They read the same signal and the ratio determines the vector. Even with a moving antenna it takes some doing to get a good front to back ratio so you need three beacons at three different frequencies to be able to get three lines that intersect.
     
  11. leopold Valued Senior Member

    Messages:
    17,455
    i think blue_uk was thinking about a sonar type of deal to measure their room.
     
  12. MetaKron Registered Senior Member

    Messages:
    5,502
    That's a pretty good idea too and doesn't require external hardware.
     
  13. cato less hate, more science Registered Senior Member

    Messages:
    2,959
    that is very hard because you don't know what you are looking at, all you know is how far away it is. with 3 external signals for guidance, you can figure out exactly where you are, and where you are going.
    that sounds good, but I will have to figure out how dipole antennas work. I have never dealt with them before. I am sure I can figure it out though. I will go to wikipedia =]
     
  14. cato less hate, more science Registered Senior Member

    Messages:
    2,959
    ok, I think I understand dipole antennas enough to use them. although, I am nore sure how I can get around making it rotate.
     
  15. Blue_UK Drifting Mind Valued Senior Member

    Messages:
    1,449
    Cato, are you trying to make a device that displays a caller ID, or simply trying to interface an LCD unit?

    I've got the LCD working, if that helps

    edit: I say 'the', I mean the standard Hitachi interface that 99% of 2x16 alphanumeric LCDs use.
     
  16. cato less hate, more science Registered Senior Member

    Messages:
    2,959
    yeah, I am not sure what I am going to do first. also, I may not end up doing a project until winter, since fall (college) is coming so fast. I need a project I can do in a month =]. which is why I wanted to do the LCD thing. however, I would like to automate something. like a robot arm, or little car, or something.

    edit: but yeah, I was just trying to use the LCD. I don't really want to make a caller ID.
     
    Last edited: Jul 26, 2006
  17. Blue_UK Drifting Mind Valued Senior Member

    Messages:
    1,449
    You should know that to use the LCD is actually very easy. What is not easy is to initially grasp the initialisation steps. The HD44780 (any 2x16 LCD you buy on ebay will most likely use this controller) needs to be sent some data to start up. The sequence - and the timings - aren't intuitive (at all). E.g. to start up: wait 15ms, send 0x18, wait 5ms, send 0x18 again, wait 100us, send 0x10, wait 40us.

    Unlike many things where you can build up slowly, correcting as you observe the progress - all of this (and more) needs to be done before anything visible happens.

    I was pulling my hair out trying to decipher the datasheets. I gained confidence, however, by downloading other people's routines and seeing how they worked. (I can give you the 'C' code if you like).

    I strongly recommend trying to get an LCD to work, as they're cheap and provide useful experience.

    Here's a picture of a simple program in action that runs a timer and converts the binary into decimal and into then ascii.

    <a href="http://img96.imageshack.us/my.php?image=2607060131bg7.jpg" target="_blank"><img src="http://img96.imageshack.us/img96/2708/2607060131bg7.th.jpg" border="0" alt="Free Image Hosting at www.ImageShack.us" /></a>
     
  18. cato less hate, more science Registered Senior Member

    Messages:
    2,959
    ok, I will try that. I will go to goodwill sometime and pick up an LCD for like 1$ and see whats inside (chip wise).
     
  19. leopold Valued Senior Member

    Messages:
    17,455
    http://www.doc.ic.ac.uk/~ih/doc/lcd/initiali.html
     
  20. cato less hate, more science Registered Senior Member

    Messages:
    2,959
    eh, I could not find anything at goodwil. perhaps I should just get one off ebay.
     
    Last edited: Jul 27, 2006
  21. cato less hate, more science Registered Senior Member

    Messages:
    2,959
    hey everyone! I got my programmer finally. well, it came Monday, but I was at work, and cold not get it till today.

    anyway, does anyone know of a sample program I could use just to make sure everything is working fine? its a PIC18FL458.

    I don't want to start programming until I test everything, what a waste of time that would be =].
     
  22. cato less hate, more science Registered Senior Member

    Messages:
    2,959
    uhh, I downloaded some MPLAB stuff with the c18 compiler addon, but I don't know how to compile =].

    does anyone hae experience with MPLAB and/or C18?
     
  23. leopold Valued Senior Member

    Messages:
    17,455
Thread Status:
Not open for further replies.

Share This Page