Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

PIC16F883, MAX3421E, Mouse controller help.

Status
Not open for further replies.

bobingabout

Newbie level 3
Newbie level 3
Joined
Mar 1, 2015
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
41
I actually havn't looked at this project in about 2 years, and I felt it was about time to get back into it. I've looked into it just enough to remember where I was upto, and why I stopped, and I am need of some assistance to be able to pick it back up again.

The project: An Amiga Mouse controller, To be able to use modern PS2 and USB mice on an Amiga using the standard Amiga 9pin D game controller port.

I do not have the most recent scematic diagram, it was lost in a hard drive failure, same with the latest PCB design, I do however have the design for the previous version of the PCB and a psyically build PCB of the previous design, with the hacked in hardware changes required. Adding the changes to the PCB, and re-drawing the Schematic would be easy.


The whole program is written in PIC Assembly, this is what I learned, and I have a very good understanding on how to program the PIC I am using in this language.


Progress:
Part one, PS2 interface. I have a fully functional program for the PIC16F883 to interface with the amiga, and PS2 mouse, and function flawlessly
Part two, USB interface. I have programmed the PIC16F883 to talk to a MAX3421E chip, set it to host controller, and detect when a USB Device has been plugged in, and what speed it is.

This is where I get stumped. I do not have enough knowledge of USB, or the MAX3421 to be able to find out what is plugged in, or how to talk to it.


What I would like to know is the sequence of binery commands to give to the MAX3421, and what I should expect it to report back if the device plugged into it is a USB mouse. You should assume I know nothing except the names of the addresses inside the MAX3421, and how to send data to it, or read data from it.

Any help would be apreciated, thank you.
 

MAX3421 is pretty low level USB, you have to implement all general USB and HID protocol details in your software. I see two practical ways for your project:
- try to get hold of the MAX3421 evaluation kit firmware sources and check if it's suitable for your design
- switch to a PIC processor with host capability (PIC24FxxGB type) and make use of the Microchip application library

Otherwise budget minimally several weeks to learn USB from the scratch and implement it on MAX3421.
 

I looked at other PICs with USB built in already. PIC24 is beyond my abillity to program (No suitable programming hardware, and is effectively a new language), and the other PICs I found with USB in the PIC16 series were device end only, not hosts (and turns out my hardware couldn't program them anyway).

From the research I did at the time (More than 2 years ago, so I can't really remember what I did), the MAX3421 was the best solution to my problem. I am aware that it is low level, which is the source of my current problems. As I said, I have already programmed the device to be able to detect that something has been plugged into it, and I know the commands to send to the mouse once it is detected, but what I lack is the knowledge on how to find out what is plugged into the MAX3421 interface, and address a USB device.


I suppose links to USB Enumeration and Addressing reference/tutorial material would be useful.
 
Last edited:

It sound somehow strange when you say PIC24 is over your head (it uses the same ICSP programming adapters as PIC16, e.g. PICkit, by the way) and at the same time decide to start MAX3421 programming almost from the scratch.

It can be of course a fascinating experience and you'll know a lot USB details if you have finished it. But it's probably a path of trial and tribulation.

When I started USB development 15 years ago (a device interface project using USBN9602, we had no suitable USB enabled mircocontrollers at that time), Jan Axelsson's USB central was a good resource, along with the official usb.org developer resources. http://janaxelson.com/usb.htm

Good luck.
 
Thank you, I'll look into that site.

Just to note, I didn't say being able to program in PIC24 was over my head, I'm sure I could quite easilly pick up the new language. I said it is beyond my abillity, because I lack the hardware(and related software) capable of programming the PIC itself.

I do not own a PICkit, I own 3rd party programmers, such as the Matrix Development board V2, or the Matrix E-Blocks EB006V9, both devices specifically designed to program a PIC16 series chip. (Both being college property, not my own)

Consider that the chips I'm dealing with are less than $10 each, A new programmer capable of programming the other chip would be a significant investment.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top