How to connect Barcode scanner to target USB of ATSAME54 Xplained pro board

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hello,
I am using the Xplained pro board(ATSAME54P20A) to learn the controller. I want to connect a barcode scanner(in USB to SERIAL mode) to target USB of the board and send its data over a serial port. Initially, I tried using the demo code of USB HOST CDC ACM which is there in ATMEL start example projects. But I was not able to figure out how to connect USB CDC ACM serial enumeration device. Can somebody please guide me where I can get a demo code (of USB to SERIAL) which suits my requirement or how to proceed on this.

Akshada Kiran Surve.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So does your barcode scanner actually appear as just a COM: port - and nothing else - when you plug it into a PC ?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

yes, Barcode Scanner appears as a COM PORT when I plug it into a PC

Akshada Kiran Surve.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

and if you plug a standard USB-to-Serial converter into your  Xplained pro board, is that correctly recognised?

 

Akshada wrote:
I am using the Xplained pro board(ATSAME54P20A) to learn the controller.

Do you have experience with any other embedded microcontroller(s) ?

 

Do you have experience with USB ?

 

Do you have experience with programming in general ?

 

If you're just getting started with this microcontroller, I would suggest some more basic examples first - USB is really not a starting project!

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello, Thank you for your response.

I tried using the demo code of  USB HOST CDC ACM which is there in ATMEL start example projects.

Current port: 0
Connect USB CDC ACM device to start or switch port to check.

This was the initial message on my terminal software. Then I plugged a USB-to-serial convertor to target USB of the board. Nothing happened. I think the board did not recognize the USB-to-serial converter. I tried to send some random bytes from terminal software.

 Detach while closing port 1/0  

 Switch port -> 0/1

this is what I got on my Terminal software.

 

Yes Sir, I have experience with programming(C) and other controllers also, but no experience with USB. I had tried working on USB HOST HID KEYBOARD on PIC24 recently.  

 

 

                                                 

 

Akshada Kiran Surve.