Re: simple serial string display help



Ok, I had the serial string stuff already from various examples I had
found across the net. So I am glad to see you have the same stuff here,
it reasures me that I am on the right track.
The CreateThread() is for creating the thread to check the serial port
I assume, yes?

Yes, your UI loop won't be running to receive that serial data, so it makes
no sense to read it there.

I figure that I could induce a screen re-draw if the
WaitCommEvent thread for receiving data was running simultaneously with
the WinMain thread . ( I am assuming that this wait event acts like an
interrupt and jumps to a portion of pre-defined code once the interupt
condition is met).
If thats the case, why couldn't I just put in all the screen redraw
stuff under the "subroutiene" of getting the serial data?

Since you're going to have to have a thread to call WaitCommEvent(), anyway
(you can't put that in the UI thread!), you might as well just do the I/O
there, too. You're going to have major flicker on the display updating with
every character, as it is. You're not going to like the result, I can
almost guarantee, but, if it's just a test program to make sure that serial
I/O is working, then I guess you may be able to live with it.

Let me add that this is going to go onto a Pencentra handheld tablet
and is ultimately going to end up in my old Bronco. I hopefully will
get it to communicate with an Atmel microcontroller and get the ADC
data from it(the Atmel). There are 8 ADC's each having 8bit usable
resolution, for vaious sensors that are on the vehicle such as
temperature, pressure, oxygen(in the exhaust), etc.... Basically I want
to display the 8 sensors, their digitized values on the Handheld, and I
would like to do it as the data comes in. Later in life, I want to use
one of the parallel ports on the Atmel to Bitbang a GPS signal into the
serial stream going to the handheld, but that is a much later project.

Anyhow, I hope this helps you understand where I am going with all
these crazy questions...

What you'll want to do is use a separate thread to get the data and
interpret it. Once a second or thereabouts, you can invalidate the display
and update your gauges, dials, etc. You're going to have to do some kind of
double-buffering, though, with the display, I think, to avoid flickering
like crazy.

Paul T.


.



Relevant Pages

  • Re: Automatically show recipient list on Word Doc open.
    ... Before you display the form, ... how do I clear all the check boxes? ... Dougie Still Going Crazy wrote: ...
    (microsoft.public.word.mailmerge.fields)
  • Re: SA 2005, Results and Comments
    ... > directions and planning, etc. ... I use SA2005 Handheld Edition. ... On the handheld display I don't like the fact that they only give you two ... lacking in some features such as displaying Track Logs. ...
    (sci.geo.satellite-nav)
  • Re: OT really cute video
    ... A better quality video of the piece is here: http://members.cox.net/transam57/lights.wmv and it doesnt have the demeaning caption to it. ... Im not crazy about the display, and I will be forever grateful its not at my neighbors house, but it is spectacular, and the folks who spent all those hours setting it up dont deserve to have their efforts trivialized the way the google sight did. ...
    (rec.crafts.textiles.quilting)
  • Re: Happy New Year from Bielefeld!
    ... All of them have seen New Year's fireworks in Germany ... before and think that we tend to get a bit crazy with it. ... Until the Millennium the only firework display in Switzerland was on ...
    (uk.media.radio.archers)
  • Re: simple serial string display help
    ... It sounds that invalidating the display is the way ... , you might as well just do the I/O ... get it to communicate with an Atmel microcontroller and get the ADC ...
    (microsoft.public.windowsce.embedded.vc)

Loading