Connect with us


Discussion in 'Electronic Design' started by john, Dec 12, 2007.

Scroll to continue with content
  1. john

    john Guest

    Hello All,

    I am trying to build a 8051 based single board computer. I am planning
    to have an ADC (0804) and serial port drivers ( 1488 and 1489) on it
    too. The project is to read the voltages form the temparature sensor
    and update a website portal using serial port.

    And I have following worries and questions

    1. Let suppose the temparature sensor updates itself every one second.
    The 8051 is also commnunicating with the PC via serial port and then
    PC is updating the portal. My question is that how will I keep
    everything synchronize?

    2. What should be the size of the RAM and EPROM?

    3. What should be the relation between the serial communication baud
    rate and the update rate of the portal and the ADC update rate?

    4. How can I measure the serial baud rate generated by the 8051?

    Please advice!
  2. Eeyore

    Eeyore Guest

    The internal UART takes that problem away from you.

    A decent compiler will tell you both of these things.

    There doesn't need to be ANY relationship. Use whatever values you need.

    Why would you want to measure it ? Set the appropriate values in the
    relevant timer according to the manual. Note the relationship to crystal

    Get a copy here.

  3. mpm

    mpm Guest

    Use a real-time-clock and send the time along with the temperture
    I would think this could easily be done w 128 bytes of RAM (the
    minimum avail on most 8051's), and 4K of code space. Note, many
    8051's use Flash these days, not EPROM, but the answer is basically
    the same.

    Bottom line is you can't count on the web to be real-time.
    You can have delays from milliseconds, to days, even longer.
    Chances are the ADC can run much faster than the serial port can
    So, you're probably left with selecting a standard baud rate, like
    9600 or ??, and slowing down your conversions to match. Or, maybe you
    can take multiple readings in between serial transmissions and average
    them first. Though, I can't think of an instance where temp would
    change this quickly...??

    For most 8051 designs, an 11.0592 MHz main clock crystal allows for
    standard baud rates. (easily divisible when stuffing the timer/counter
    Oscilliscope or a dedicated communications test set capable of
    measuring RS232.
    The cheap-and-dirty way would be to just connect the output to
    HyperTerminal (Microsoft Windows app) and you'll know you got it right
    when you can see the characters on screen correctly. (This is more
    "verification", than "measurement", but you get the idea...)
    Good luck. -mpm
  4. How about a PIC with some ADC and a MAX232?
    Much simpler.
    Protocol, have the PC ask the board for a temp measurement,
    the board then sends the result(s).

    Any PIC has enough.
    PC and board baudrate should be the same, and in the above case it
    can be almost any value.

    Read the docs?
  5. Project for school?
    Make one the master and one the slave. For example, have the 8051 send
    a data packet once every second and have the PC parse it in an event
    loop. You could also have the PC request data and the SBC respond with
    the data, in which case the 8051 would not have to keep track of time
    for that purpose.
    As much as needed. For something like this, you probably can't buy one
    too small.
    The baud rate is probably going to be fast enough for once a second no
    matter what reasonable baud rate you choose. A common baud rate is
    9600 baud, 8 bits no parity. Decide on your packet format and maybe
    add a checksum and you can figure out how many bytes. Suppose you have
    lots of overhead and send 15 bytes, that's roughly 15msec at 9600
    An oscilloscope. But if you do the programming right, there's no need
    to measure it, it will just arrive error-free at the PC.
    Best regards,
    Spehro Pefhany
  6. donald

    donald Guest

    Here you go, 1/2 your homework done for you.

    All you need is the portal side done.

    The above link was the first hit on google.

    I am sure you can find the rest of your homework done for you.

    Good luck

Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day