EmbeddedRelated.com
Forums

8051 and ADC

Started by john December 12, 2007
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?

5. Can somebody advice me how to make interface with portal on the PC
side?

Please advice!
John
On Dec 12, 2:49 pm, john <conphil...@hotmail.com> wrote:

> > 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?
Well you can generate the timing from one of three places here: You can i) Pump out data asynchronously to the PC and have it update the website. ii) Have the PC interrogate the 8051 and then post the resulting data to the website. ii) Wait until a user requests a temperature from a web page, then go and get it from the 8051 and serve it from the PC
> 2. What should be the size of the RAM and EPROM?
Large enough, but no larger.
> > 3. What should be the relation between the serial communication baud > rate and the update rate of the portal and the ADC update rate? >
Put it this way - do you think 0.0001 Baud would be sensible?
> 4. How can I measure the serial baud rate generated by the 8051?
Well you could use an oscilloscope. But why would you want to? Surely you are in control of the 8051s baud rate?
> > 5. Can somebody advice me how to make interface with portal on the PC
I would be more than happy to bid for the work - about =A320K would be about right. More homework? TW
Hi,

Thanks Ted. Its not home work. I have to build the whole thing.  Can
any body suggest any link or some pointers to build the portal
interface using some programming language. Plus I am open for more
suggestions on the questions.

Regards,
John
On Dec 12, 10:49 pm, john <conphil...@hotmail.com> wrote:
> 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? > > 5. Can somebody advice me how to make interface with portal on the PC > side? > > Please advice! > John
Google bit more;-)
> 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?
What ever OS you are using does not matter, single thread should fix it. Fetch data form serial port and update the DB, file or web field.
> 2. What should be the size of the RAM and EPROM?
What ever comes with your controller should be enough for given situation.
> 3. What should be the relation between the serial communication baud > rate and the update rate of the portal and the ADC update rate?
Use timer in PC (portal) envirment if you want to update the status atomatically. Moreoever, portal update cann't succedd the rate of ADC. 0- Controller interrupts when ADC is done. 1- Handle inturrpt of send routine (serial port in PC) . 2- Update the DB , webpage or file in same thread.
> 4. How can I measure the serial baud rate generated by the 8051?
Ted made that clear, get your self next to oscilloscope.
> 5. Can somebody advice me how to make interface with portal on the PC > side?
If you are on M$ then activeX or simple dll. On *ix go for batch or maybe php. ali
ali wrote:
If you are on M$ then activeX or simple dll. On *ix go for batch or
maybe php.

Would you please explain a little more?

Regards,
John

john <conphiloso@hotmail.com> writes:

> 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
This *really* sounds like homework - from 1980! :)
> and update a website portal using serial port.
Or maybe not...
> 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?
Very, very small.
> 3. What should be the relation between the serial communication baud > rate and the update rate of the portal and the ADC update rate?
If it's only once a second it does not matter.
> 4. How can I measure the serial baud rate generated by the 8051?
With an oscilloscope
> 5. Can somebody advice me how to make interface with portal on the PC > side?
-- John Devereux
On Wed, 12 Dec 2007 06:49:29 -0800 (PST), john
<conphiloso@hotmail.com> wrote:

>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? > >5. Can somebody advice me how to make interface with portal on the PC >side? >
5. For quick and easy, I'ld use VisualBasic and MSComm for the serial port. VB will sit and listen to the serial port and do whatever when the 8051 sends somthing... or ... have the 8051 wait on the serial port and have VB request a reading from it. Too rusty on web programming to remeber how to have HTML do VB.
>Please advice! >John
On Dec 13, 1:09 am, john <conphil...@hotmail.com> wrote:
> ali wrote: > > If you are on M$ then activeX or simple dll. On *ix go for batch or > maybe php. > > Would you please explain a little more? > > Regards, > John
Write activeX or DLL in your favourite language (vc or vb) todo serial port stuff. Now call your activeX or dll in html page. Google for using activex or dll in webpage. Sure, you got to do server side scripting too that can be done in java, asp etc. For *nix type machines try CGI it simple and best way. or just write some batch that will read serial port and send back to caller which will be java or php server page. I didn't try this design by my self but quite sure should work. And as far as activeX or dll is concern that 100% solution. BTW, what platfor you are on? ali
john wrote:
> 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? > > 5. Can somebody advice me how to make interface with portal on the PC > side? > > Please advice! > John
I assume you are serious. 1 - First how are you making the board? 2 - ditch the 1488 and 1489 use a MAX232. 3 - some 8052 have a built in A2D 4 - memory a standard 8052 has 8K of flash and 256 bytes of RAM more than enough. 5 - www.8052.com 6 - What language are you programming this in C Pascal ,asm, Forth? 7 - How will you talk to the 8052 from the PC? 8 - Budget? 9 - Why If it is not homework. Do you need to measure temperature for a website? Are you making 1 or many?
Neil wrote:

> john wrote: > >> 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.
<snip>
> 2 - ditch the 1488 and 1489 use a MAX232.
It sure takes less time to wire up a breadboard using 1488s and 1489s than MAX232s (fewer discretes) -;) Michael