• AVR Freaks

Helpful ReplyPIC16F with MAX3421E or MAX3420E

Author
ric
Super Member
  • Total Posts : 22715
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: offline
2019/07/12 05:26:58 (permalink)
5 (1)

PIC16F with MAX3421E or MAX3420E

Has anyone here done any work with the MAXIM USB Peripheral/host controllers (MAX342x) ?
The MAX3421E is controlled via SPI, and can act as either a USB2 host or device. They've been around for years, and you can now get very cheap boards on eBay with one already mounted.
A work colleague asked if there was an easy way to sniff the data flowing from an HID controller to a USB host, and I think it could be done fairly simply using a pair of these MAXIM chips, one acting as a host and the other as a device.
I could then implement a "man in the middle" to accept data from the controller (with one interface acting as "host"), and pretend to be that same device, passing the data through the second controller acting as a device.
There's an app note on the Maxim website showing how to act as an HID device using the MAX3420 chip. That is an older device which can only act as a peripheral. The MAX3421 emulates a MAX3420 when in device mode, so the code should be perfectly usable, it just needs a little massaging to compile with XC8 and control a PIC SPI port.
I haven't yet found the equivalent code to act as a host, and I'm hoping not to have to reinvent too many wheels.
 
So, I'm looking for anyone else who may have already gone down the same road. :)
 
 

I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#1
ric
Super Member
  • Total Posts : 22715
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: offline
Re: PIC16F with MAX3421E or MAX3420E 2019/07/17 15:54:32 (permalink) ☄ Helpfulby mlp 2019/07/18 07:48:04
+1 (1)
No-one?
I've ordered a couple of these cheapie boards from eBay:
https://www.ebay.com.au/i...d=p2057872.m2749.l2649

and I'm planning to make a prototype board with two of them and a PIC16F1459. That would potentially let me use either the PIC's embedded USB device interface OR one of the modules to act as the device, and the second module as the host.
This is just an experiment, but I think it should be fun. :)

I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#2
Jim Nickerson
User 452
  • Total Posts : 6023
  • Reward points : 0
  • Joined: 2003/11/07 12:35:10
  • Location: San Diego, CA
  • Status: offline
Re: PIC16F with MAX3421E or MAX3420E 2019/07/18 07:47:21 (permalink)
0
I am guessing you/ your colleague want to do more than just sniff to watch the exchange.
#3
mlp
boots too small
  • Total Posts : 765
  • Reward points : 0
  • Joined: 2012/09/10 15:12:07
  • Location: previously Microchip XC8 team
  • Status: offline
Re: PIC16F with MAX3421E or MAX3420E 2019/07/18 07:56:36 (permalink)
0
ric
No-one?
I've ordered a couple of these cheapie boards from eBay:

Nifty.
I found multiple vendors selling what looks from the photos to be exactly the same board, and helpfully(not!) none of them mention the Maxim chip.
 
[gah, firewall; OK, no link]
eBay keywords: Mini-USB-Host-Shield-2-0-ADK-Module-SPI-Interface-Expansion-Board-For-Arduino
 

Mark (this opinion available for hire)
#4
ric
Super Member
  • Total Posts : 22715
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: offline
Re: PIC16F with MAX3421E or MAX3420E 2019/07/18 08:03:28 (permalink)
0
JANickerson
I am guessing you/ your colleague want to do more than just sniff to watch the exchange.

He's actually building a full size car dashboard to connect into a driving game on an XBOX, and wants to monitor the throttle, brake etc. inputs.
Apparently they are all potentiometers going into a black box that then connects to the XBOX via USB, so plan B is just to use several ADC channels to measure them directly.

I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#5
ric
Super Member
  • Total Posts : 22715
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: offline
Re: PIC16F with MAX3421E or MAX3420E 2019/07/18 08:10:24 (permalink)
0
I think it's a Chinese copy of an original board.
The differences are discussed at https://www.arduino.cn/thread-81435-1-1.html
You can see a schematic of the original board at https://github.com/Linux-...sheets/UHS_mini_10.pdf
 
 

I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#6
Jump to:
© 2019 APG vNext Commercial Version 4.5