Hi all,
Has anyone got any ideas about where to get some C code to read a barcode?
Ive got a pen but dont know what to plug it to.
You need to supply quite a lot more information than that.
A lot of bar code readers emits then bar code as ASCII text on some form of serial interface (PS/2, RS-232, USB, ...)
The manufacturer of the bar code reader normally have data sheets that describes exactly what variants of bar codes the reader can handle, and exactly the format of the messages sent out. Without such a datasheet, it will be up to you to figure out format and framing of the data.
Thanks for your reply.
The barcode pen just has a digital (I think TTL) output. The datasheet says that it is a raw output.
When I scope it I think I see a pulse for each black bar.
Any ideas how I can get the data from this?
" I think I see a pulse for each black bar"
Decoding this is quite advanced - you have to cope with speed variations as the user sweeps the pen, possibly not sweeping in a straight line, imperfections in the barcode, etc, etc,...
You would be far better advised to get a "smart" pen that does the hard work for you.
You might try looking to Agilent (formerly HP) for chips to do this...
View all questions in Keil forum