Thread: decode data and screen refresh

  1. #1
    Registered User
    Join Date
    Dec 2005
    Posts
    3

    decode data and screen refresh

    Hello,
    first of all, sorry for my english, I hope you will understand me.
    I'm a beginner in c programming, which can explain the level of my questions.
    A telegram (constituted of letters, numbers and symbols sequence) arrives periodically (incoming data frequency faster or not than the processor's one). The aim is to decode it and establish a classification. For doing this, I guess I will take each incoming caracter , store it in a buffer with a pointer and, when the entire telegram has been received, decode it and find the class. During this time, I need to wait for the following caracters.
    So, I don't want to interrupt the incoming messages main loop.
    Moreover, from one classification to another (one measurement to another), I'd like to refresh the screen on which I want to display the current class found.
    Is anybody here who can help me (for the algorithm or better for the programming)?
    I'm sorry for the level of my questions (I hope at least you've understood them!) and thank you very much in advance for your help.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Which operating system?
    Which compiler?
    What sort of screen - a simple console or a GUI?
    Where are characters coming from - keyboard, serial port, network ?

  3. #3
    Registered User
    Join Date
    Dec 2005
    Posts
    3
    thank you for your interest
    I will use metrowerks software environment for programming.
    I will also use an LCD display.
    In fact, I've created a pcb constituted of a microcontroller, a LCD display, power supply (and other components...). This will be a tester for occupant classification. I have my tester connected to the Multi gateway with a serial interface and the Multi gateway is connected to the occupant classification sensor. I have to send a request and thereafter will receive periodically messages. Each character of the answer telegram shall arrive periodically so I must to store it on a buffer and when all the telegram will be receive I can decode it and find the class.
    I hope I have not forgotten to tell you important things.
    Thank you again in advance

  4. #4
    Registered User
    Join Date
    Dec 2005
    Posts
    3
    thank you for your interest
    I will use metrowerks software environment for programming and afterwards implemenet it on the developed hardware .
    I will also use an LCD display connected to the microcontroller star12 via a parallel interface.
    In fact, I've created a pcb constituted of a microcontroller, a LCD display, power supply (and other components...). This will be a tester for occupant classification. The speed of the processor should be around 8MHz. I have my tester connected to the Multi gateway with a serial interface (RS232 cable) and the Multi gateway is connected to the occupant classification sensor via GMLAN standard communication interface which transmits messages at 38400 Bauds. I have to send a request, receive then a kay which enables the communication and thereafter will receive messages periodically. Each character of the answer telegram shall arrive periodically so I must store it on a buffer and when the whole telegram will be receive I can decode it and find the class.
    First of all I will initialize the ports (of the microcontroller, of the MAX232 and of the display) as I/O, IN or OUT according to the data sheets I have (for the parallel interface, the ports receiving the data bits transmitted between the microcontroller and the display will depend on the value of the R/W and the enable signals.
    Thereafter I send the request telegram to the MGW so as to enable GMLAN communication, wait for the answer telegram and afterwards wait for the incomming messages received without previous request. I must store all the data and wait at the same time for the new incomming characters, and since the speed of the incomming messages should be very slow compared to the speed of the processor, I can use an interruption to store the incoming data. When the whole telegram has been received, I just have to take all the data sequentially, decode them, refresh the display and display a class found or an error signal.
    I have had some ideas, I have forgotten to write and I realize that they are necessary
    Thank you in advance

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Reading pixel color data from screen
    By JJFMJR in forum Windows Programming
    Replies: 8
    Last Post: 08-22-2008, 12:27 PM
  2. Read pixel color data from screen?
    By JJFMJR in forum Windows Programming
    Replies: 4
    Last Post: 08-11-2008, 10:15 AM
  3. Feedback: Functional Specification Wording
    By Ragsdale85 in forum C++ Programming
    Replies: 0
    Last Post: 01-18-2006, 04:56 PM
  4. i am not able to figure ot the starting point of this
    By youngashish in forum C++ Programming
    Replies: 7
    Last Post: 10-07-2004, 02:41 AM
  5. clearing screen and test data
    By jemma f in forum C Programming
    Replies: 1
    Last Post: 09-11-2002, 03:05 AM