I am a student doing a micro controller project at the university of North London. The project title is an Electronic Student Register. What the system does is to read the barcodes of individual students entering and leaving the class. The program increments and decrements students entering and leaving the class. The problem I am faced with is that I don't know how to go about sending an eight digit number in the form of a barcode via an RS 232 to the micro controller itself (8051). (ie how does the 8051 read the information?) If you have any ideas on how to go about solving the problem, I would be very interested to hear from you. Thank You. PS Email:asteroids@solastar.fsnet.co.uk Lawrence Jarrett.
This all depends upon how the information is output by the barcode reader. Does it output RS232 already? If so, maybe the characters are already decoded into ASCII.
Depends on the exact barcode reader in question, but most likely it just sends out ASCII from its RS232 port when it scans barcodes. So, just connect the two serial ports, and read input from the 8051 serial port normally. You'll probably find the library functions scanf(), atoi(), and/or strtoul() handy for converting the ASCII input to a binary integer format.