View previous topic :: View next topic |
Author |
Message |
mmarlette
Joined: 30 Nov 2007 Posts: 311 Location: Delano, MN
|
Posted: Thu Mar 10, 2011 3:19 am Post subject: AT90USB as host |
|
|
I am starting to look at my next project. I currently have a vintage computer that has an old style matrix keyboard.
I have made the design to work with BASCOM and an ATmega48/88 with a PS/2 keyboard. Keyup, keydown events all being processed, key lookups and programmable function keys.
I am now looking to moving the hardware layer from the PS2 design over to USB. The USB keyboard's input, would be processed and then outputted to the old style matrix via the AVR and some hardware, just like in the PS2 version.
I have tried to search and it appears, and please correct me if I am wrong. That BASCOM-AVR - USB Add On and a AT90USB162 or equiv. chip doesn't really support being a HOST?
Atmel has the app note AVR271 that does this in C. I am no C head. I know hardware and BASCOM very well.
Also have read AN#176 where Petr uses the Software USB library from Mr. Ollopa. These seem to be client side or devices streaming data to a host.
Have also read to use a host IC like Maxim or FTDI. Is this correct?
Can someone point me in the right direction or tell me if I am correct in my statements? Just seem to be hitting dead ends.
TIA |
|
Back to top |
|
|
radan
Joined: 06 Jan 2007 Posts: 35
|
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Thu Mar 10, 2011 10:18 am Post subject: Re: AT90USB as host |
|
|
mmarlette wrote: | I am starting to look at my next project. I currently have a vintage computer that has an old style matrix keyboard.
I have made the design to work with BASCOM and an ATmega48/88 with a PS/2 keyboard. Keyup, keydown events all being processed, key lookups and programmable function keys.
I am now looking to moving the hardware layer from the PS2 design over to USB. The USB keyboard's input, would be processed and then outputted to the old style matrix via the AVR and some hardware, just like in the PS2 version.
I have tried to search and it appears, and please correct me if I am wrong. That BASCOM-AVR - USB Add On and a AT90USB162 or equiv. chip doesn't really support being a HOST?
Atmel has the app note AVR271 that does this in C. I am no C head. I know hardware and BASCOM very well.
Also have read AN#176 where Petr uses the Software USB library from Mr. Ollopa. These seem to be client side or devices streaming data to a host.
Have also read to use a host IC like Maxim or FTDI. Is this correct?
Can someone point me in the right direction or tell me if I am correct in my statements? Just seem to be hitting dead ends.
TIA |
The AVR271 is a keyboard device. And the bascom usb add on does support this with an example.
The USB162 is a device mode only chip so it is impossible to do host code with it. You need an USB1287.
There is not much interest in the USB add on which only supports device mode. For this reason it is not likely that i will add host mode support to it. Unless i need it for a project. _________________ Mark |
|
Back to top |
|
|
mmarlette
Joined: 30 Nov 2007 Posts: 311 Location: Delano, MN
|
Posted: Thu Mar 10, 2011 2:10 pm Post subject: |
|
|
radan wrote: | http://bascom.at.ua/publ/atomnaja_klaviatura_vinduksoida_hid_usb/1-1-0-54 |
This is an app that ACTs like a keyboard and not a HOST to an actual USB keyboard. This is going from a matrix to USB. I need to go from USB to a matrix.
So this will not work as I see it. I have reviewed the code as well and the comments are VERY hard to read in English.
Done this all already in a PS/2 style interface on the ATmega48/88 in BASCOM, LED control, basically change 3 subs and the app will be running on USB. Only three subs talk to the hardware level.
There appears to be support on other platforms but I will do this in BASCOM. I will just add a layer of hardware. |
|
Back to top |
|
|
mmarlette
Joined: 30 Nov 2007 Posts: 311 Location: Delano, MN
|
Posted: Thu Mar 10, 2011 2:46 pm Post subject: Re: AT90USB as host |
|
|
mmarlette wrote: | I am starting to look at my next project. I currently have a vintage computer that has an old style matrix keyboard.
I have made the design to work with BASCOM and an ATmega48/88 with a PS/2 keyboard. Keyup, keydown events all being processed, key lookups and programmable function keys.
I am now looking to moving the hardware layer from the PS2 design over to USB. The USB keyboard's input, would be processed and then outputted to the old style matrix via the AVR and some hardware, just like in the PS2 version.
I have tried to search and it appears, and please correct me if I am wrong. That BASCOM-AVR - USB Add On and a AT90USB162 or equiv. chip doesn't really support being a HOST?
Atmel has the app note AVR271 that does this in C. I am no C head. I know hardware and BASCOM very well.
Also have read AN#176 where Petr uses the Software USB library from Mr. Ollopa. These seem to be client side or devices streaming data to a host.
Have also read to use a host IC like Maxim or FTDI. Is this correct?
Can someone point me in the right direction or tell me if I am correct in my statements? Just seem to be hitting dead ends.
TIA |
albertsm wrote: | The AVR271 is a keyboard device. And the bascom usb add on does support this with an example.
The USB162 is a device mode only chip so it is impossible to do host code with it. You need an USB1287.
There is not much interest in the USB add on which only supports device mode. For this reason it is not likely that i will add host mode support to it. Unless i need it for a project. |
Mark,
Thanks for your reply. I do have an additional question based upon your response.
I have looked at the BASCOM-AVR - USB Add On at your web page, it states.......
Support for the USB162, and USB1287 was added to BASCOM. Other USB chips will be supported too. Some USB chips support host and device modes.
The USB162 supports only the device mode. It is a perfect chip for many projects that require an USB interface.
So from your response BASCOM's addon doesn't support HOST mode. The example is for the USB162. So then the USB1287 must be able to do both DEVICE and HOST but the add on just supports DEVICE mode?
Having a hard time determining that from the web page but your description seems to be as I stated.
I would be happy to purchase the add on if it fits my requirements for the design of being HOST mode capable. Please advise. |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Thu Mar 10, 2011 2:56 pm Post subject: |
|
|
The add on supports all USB chips that are supported by bascom (look for the USB dat files). So the usb1287 is also supported.
And yes, while the usb1287 can do host and device mode, it only supports device mode. I never checked what is required to add host mode.
While device mode share a lot of common code for most devices, in host mode, it will depend on the what you want to host. A keyboard seems simple enough. But a printer or camera, is something else. _________________ Mark |
|
Back to top |
|
|
six1
Joined: 27 Feb 2009 Posts: 553
|
|
Back to top |
|
|
mmarlette
Joined: 30 Nov 2007 Posts: 311 Location: Delano, MN
|
Posted: Thu Mar 10, 2011 3:11 pm Post subject: |
|
|
Mark,
I am going to get the add on. I am aware that it is device mode only but find this all interesting and who knows, maybe I can get the host mode working for a keyboard. ???
If nothing else, support for a GREAT product!
Thanks again for everything you do.
Regards,
Mark |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Fri Mar 11, 2011 11:18 am Post subject: |
|
|
thanks for your support too.
i did check to see if there is some host code, but i could not find it.
but i also could not find the samples that were around earlier.
when you find a sample for usb1287 host mode let me know.
I did found out that it is probably much easier than the device mode. _________________ Mark |
|
Back to top |
|
|
mmarlette
Joined: 30 Nov 2007 Posts: 311 Location: Delano, MN
|
Posted: Fri Mar 11, 2011 5:11 pm Post subject: |
|
|
Mark,
I appreciate your look into this.
I am VERY new to USB so I am a bit slow on the uptake. Hardware is a snap for me. I have the BASCOM AVR USB Add On installed and I am reviewing.
I know you are very busy and don't want to burden you with stupid questions. I can do a lot of the leg work and supply results back to you but I am unclear by what you are exactly looking for in a 1287 host mode example. I have done hours of research on this and it appears that a certain platform seems to be well liked and functional. I don't want to violate any forum rules by talking about this here. If indeed that would be the case??
I tried to PM you but that is disabled.
I can post some link references or provide specific code examples here. Those wouldn't be in reference to BASCOM, so not appropriate, IMHO.
Please advise and as always, TIA. |
|
Back to top |
|
|
plouf
Joined: 19 Jan 2012 Posts: 78 Location: Athens,Greece
|
Posted: Mon Jul 06, 2015 9:00 pm Post subject: |
|
|
reply here its similar, instead of creating new post's
Is any news about USB Host mode? wand to read hid devices ! |
|
Back to top |
|
|
Tiny
Joined: 10 Nov 2010 Posts: 101 Location: The Netherlands
|
Posted: Fri Jul 10, 2015 5:53 pm Post subject: |
|
|
Reading usb devices would be very nice, i'm interested in connecting usb keyboard to atxmega en read them.
Tiny |
|
Back to top |
|
|
|