Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

AT90USB as host

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR
View previous topic :: View next topic  
Author Message
mmarlette

Bascom Member



Joined: 30 Nov 2007
Posts: 311
Location: Delano, MN

usa.gif
PostPosted: Thu Mar 10, 2011 3:19 am    Post subject: AT90USB as host Reply with quote

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
View user's profile
radan

Bascom Member



Joined: 06 Jan 2007
Posts: 35

ukraine.gif
PostPosted: Thu Mar 10, 2011 6:36 am    Post subject: Reply with quote

http://bascom.at.ua/publ/atomnaja_klaviatura_vinduksoida_hid_usb/1-1-0-54
Back to top
View user's profile Visit poster's website
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 6197
Location: Holland

blank.gif
PostPosted: Thu Mar 10, 2011 10:18 am    Post subject: Re: AT90USB as host Reply with quote

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
View user's profile Visit poster's website
mmarlette

Bascom Member



Joined: 30 Nov 2007
Posts: 311
Location: Delano, MN

usa.gif
PostPosted: Thu Mar 10, 2011 2:10 pm    Post subject: Reply with quote

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. Smile

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
View user's profile
mmarlette

Bascom Member



Joined: 30 Nov 2007
Posts: 311
Location: Delano, MN

usa.gif
PostPosted: Thu Mar 10, 2011 2:46 pm    Post subject: Re: AT90USB as host Reply with quote

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
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 6197
Location: Holland

blank.gif
PostPosted: Thu Mar 10, 2011 2:56 pm    Post subject: Reply with quote

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
View user's profile Visit poster's website
six1

Bascom Expert



Joined: 27 Feb 2009
Posts: 553

germany.gif
PostPosted: Thu Mar 10, 2011 3:10 pm    Post subject: Reply with quote

http://www.embedded-projects.net/index.php?page_id=153

http://translate.google.de/translate?u=http%3A%2F%2Fwww.embedded-projects.net%2Findex.php%3Fpage_id%3D153&sl=de&tl=en&hl=&ie=UTF-8

_________________
For technical reasons, the signature is on the back of this message.
Back to top
View user's profile
mmarlette

Bascom Member



Joined: 30 Nov 2007
Posts: 311
Location: Delano, MN

usa.gif
PostPosted: Thu Mar 10, 2011 3:11 pm    Post subject: Reply with quote

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
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 6197
Location: Holland

blank.gif
PostPosted: Fri Mar 11, 2011 11:18 am    Post subject: Reply with quote

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
View user's profile Visit poster's website
mmarlette

Bascom Member



Joined: 30 Nov 2007
Posts: 311
Location: Delano, MN

usa.gif
PostPosted: Fri Mar 11, 2011 5:11 pm    Post subject: Reply with quote

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
View user's profile
plouf

Bascom Member



Joined: 19 Jan 2012
Posts: 102
Location: Athens,Greece

greece.gif
PostPosted: Mon Jul 06, 2015 9:00 pm    Post subject: Reply with quote

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
View user's profile
Tiny

Bascom Member



Joined: 10 Nov 2010
Posts: 110
Location: The Netherlands

netherlands.gif
PostPosted: Fri Jul 10, 2015 5:53 pm    Post subject: Reply with quote

Reading usb devices would be very nice, i'm interested in connecting usb keyboard to atxmega en read them.

Tiny
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum