MAX3421E to PIC18F4550

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??

Reply to
urefowei
Loading thread data ...

You could use a chip that has the MSSP module in it (e.g. 18F2458,

18F4553). [Use the Microchip website's product selector to find a PIC with the right peripherals]

You can do SPI communications by bit-bashing but it will be slow. There are countless examples of this around.

Andrew

Reply to
Andrew Jackson

handle

capabilities

host

(page

interrupt

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.

Reply to
urefowei

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.

Andrew

Reply to
Andrew Jackson

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.
Reply to
urefowei

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.

Andrew

Reply to
Andrew Jackson

i will reply later.. there has been bombing here,, thanks..

but to answer your concern, PIC18F4550 also has Master Synchronous Serial Port (MSSP) module..

thanks

Reply to
urefowei

Keep safe.

Ah so it does: I was looking at 2006 copy of the datasheet.

Andrew

Reply to
Andrew Jackson

In message , urefowei writes

Where is here?

Are you OK?

-- \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/ \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Reply to
Chris H

Here in Iligan city, Philippines..

Andrew, I have just logged in..

Our adviser suggested to use this interrupt-on-change pin from the PIC.. Pins 25-28. Can we actually supplement this either this pins for GPX??

Reply to
urefowei

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

Andrew

Reply to
Andrew Jackson

if anyone can help us.. please feel free to yahoo messenger or mail at snipped-for-privacy@yahoo.com

thanks

Reply to
urefowei

if anyone can help us.. please feel free to yahoo messenger or mail at snipped-for-privacy@yahoo.com

thanks

Reply to
urefowei

We already did list our required functions as of Figure 21 (MAX3421E in a Host Application) of MAX3421E DS..

is this diagram enough??

or do we need to add additional peripheral features to accomplish this.....

handle

capabilities

if you are a bit confused of our objectives, we are doing a device similar to this product

formatting link

thanks

Reply to
urefowei

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.

--
Joe Chisolm
Marble Falls, TX
Reply to
Joe Chisolm

thanks..

checking

Reply to
urefowei

please look at this if we are connecting these pins right

MAX3421 ---->>>> PIC18F4550 pin13(SCLK) ---->>>> pin34(SCK) pin16(MOSI) ---->>>> pin26(SDO) pin14(SS) ---->>>> pin36(RB3) pin15(MISO) ---->>>> pin33(SDI) pin18(INT) ---->>>> pin35(INT2) pin17(GPX) ---->>>> pin37(KB10)

are we doing this right?? we are implementing an interrupt-on-change for GPX. Alternatively, we want to....

pin17(GPX) ---->>>> pin33(INT0) this means that we are connecting 2 pins [pin15(MISO) and pin17(GPX)] with different functions at pin33(SDI and INT0)

which is more preferable??

i do appreciate your replies sir.

Reply to
urefowei

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.

--
Joe Chisolm
Marble Falls, TX
Reply to
Joe Chisolm

need

bus?

Reply to
urefowei

now we are really on a big problem, MAX3421E is a TQFP 5mm x 5mm small.. how the hell are we going to solder this??

hehehe..

anyway, we are also having problems purchasing our parts.. need help..

Reply to
urefowei

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.