we are doing a thesis on a flash to flash bridge This project aims to develop microcontroller-based device that can handle data transfer from a USB storage-device directly to another USB storage-device. The previous project?s device transferring capabilities were limited in terms of data size, file types, and transfer rate.
we are currently using PIC184550 as our MCU and the MAX3421E as the host controller..
Looking at Figure 21 (MAX3421E in a Host Application) of MAX3421E DS (page
26),we could not connect SS and GPX, SPI serial slave output and interrupt pin, respectively, to our PIC..
What can we do about this?? Can we supplement other IO pins on our PIC for these purpose??
We were advised to have two connections in one pin. Is that possible?? for example... >>> connecting a single PIN33 of PIC18 with an external interrupt 0 and SDI to pin17 (GPX) and pin15 (MISO)MAX3421.
You need to draw a list of pins on each component and then look at each of their datasheets to see what can be shared. Some pins it won't make sense to share (while it might be possible to share them in terms of hardware it might lead to impossibly difficult software). Think about your requirements for each component.
we actually considered Figure 21 (MAX3421E in a Host Application) on page
26 of MAX3421E DS for our application.. are we doing it right?? we hope to finish our project before the end of march next year.. thank you for your kind followups.
If you are short of pins you can use just MISO on the MAX3421E. To make life easy I would initially try and use one pin for one function: it makes the system less complex that way and hence easier to get working.
I would also try and use a PIC that has the MSSP in it as this lets you run the SPI interface faster.
-- \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
If you draw up a list of what pins your are going to use on the PIC and the MAX3421 that would be helpful. Use the function not the pin number (e.g. PB6, etc.) rather than the pin number (unless you specify package types).
I think you are making this more complicated than it needs to be. I'm not sure why you are having a pin count problem, the 18F4550 has a boat load of pins.
You dont need an interrupt for the 3421 GPX pin unless you configure it for INT or SOF output - which you probably dont need in this app. There is no reason to make GPX the interrupt pin - UNLESS you are trying to do something with the other GPIO pins and need interrupt status on them. In either case just tie the INT or GPX pin to a PIC INTx pin and configure the PIC for rising or falling edge as needed. All the other GPX functions are just operational status. Tie the GPX to a PIC (configured) input pin and monitor the pin in your firmware loop.
You do not need to use an external transceiver for the PIC device USB side. Use the internal transceiver and either the internal voltage regulator or the 3.3V you supply to the MAX. If you use the internal regulator remember to tie VSUB to ground with a 220nF cap. The PIC USB core has it's own set of interrupts. Your ISR can easily determine which USB side is knocking on the door.
The 4550 has a MSSP that will do SPI - see section 19 of the
18F4550 data sheet. Configure the MAX for full duplex mode. MasterInputSlaveOutput (MISO) pin goes to the PIC SDI pin. Tie the 4550 /SS pin to the 3421 /SS pin. Are you trying to use more than 1 SPI slave device, eeprom or something else?
You can use the same 12Mhz clock source for the MAX and the PIC. Use the PIC PLL block with a divide by 3. If you have a 18LF and NOT using VDD=5V watch your core clock speed. See the chart back in the electrical spec section.
On Sat, 20 Dec 2008 19:21:32 -0600, urefowei wrote: [snip]
I was wrong on the /SS pin. I was writing this from memory. You may need to drive /SS from the PIC -> 3421 depending on SPI configuration. If the 3421 is the only thing on the SPI bus then I ask you, why would you need to drive slave select from the PIC if it's the only slave on the bus?
The connections seem ok. Try it and see what happens.
Check the MSSP/SPI section in the PIC data sheet. For shared pins the functions change when you enable different modules. You will know the answer to the above question.
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.