8 years, 11 months ago.

How to access the buffer of the arm processor?

please provide a sample code for interfacing a barcode reader, and store its scanned data in the buffer, and show the data.

1 Answer

8 years, 11 months ago.

What you're asking to do is how to read data from a serial port and then perform some operation based on what was input.

That the data is coming from a barcode reader doesn't matter, it's just serial data.

There are hundreds of examples of how to do this already, you could start with https://developer.mbed.org/handbook/Serial and https://developer.mbed.org/users/4180_1/notebook/id-tech-4439-barcode-scanner/

Once you have some code feel free to ask questions if it doesn't work and people will help you.

My barcode scanner has a USB interface but it can work as a Serial I/O device. As for wire connection, I have tried to connect the four wires of USB out to LPC1768. (Black to GND, Red to Vin, Green to D+, White to D-. But nothing is being read from the scanner by the ARM. Can we not operate like this? How can I connect a USB output as input serial data to ARM?

posted by Saswata Chatterjee 12 May 2015

Is it an RS232 serial device or a USB serial device? If it's a USB serial device then use the USBSerial library. If it's an RS232 device then you need an RS232 level shifter and the standard Serial library

posted by Andy A 13 May 2015