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.

Problem in receiving data to PIC MCU from Barcode Scanner thru' MAX3421E

Status
Not open for further replies.

speedEC

Full Member level 6
Full Member level 6
Joined
Apr 1, 2011
Messages
337
Helped
23
Reputation
46
Reaction score
21
Trophy points
1,298
Activity points
4,324
Dear all,
I am interfacing Barcode Scanner (USB) with PIC MCU thru' MAX3421E. I can able to connect and Enumerate the Scanner. But after that, I could not able to receive the barcode value from barcode scanner when reading. Barcode Scanner sounds good-read. It works well with PC (but we have to open a notepad or similar text editor to receive data).
I have enabled RWUIE (Remote Wake Up Interrupt) in MAX3421E and waiting for RWUIRQ interrupt to occur. When I read the barcode label and after barcode read it sends good-read, but RWUIRQ not interrupt occurred.
I have enabled RWUIE in HIEN register (R26) & IE in CPUCTL register (R16). I have tested the INT pin for other interrupts, for example Bus Reset, USB Disconnect, etc. All are working OK except, RWUIRQ.

I have SUSPENDED the Peripheral (Scanner) by seting the SOFKAENB = 0. So, after this I am waiting for either USB Disconnect or RWUIRQ occur. If I disconnect USB, interrupt correctly occur but only RWUIRQ DOES NOT.

USB Host Shield for Arduino used (for MAX3421E)., +3.3V
PIC MCU, +5V
BARCODE SCANNER(USB TYPE- BUS POWERED), +5V Given from adapter

LEVEL SHIFT USED between PIC and MAX3421E.

Any idea?
thank you.

- - - Updated - - -

Datasheet info added:
 

Attachments

  • SUSPEND_PERIPHERAL_MAX3421E.JPG
    SUSPEND_PERIPHERAL_MAX3421E.JPG
    21.1 KB · Views: 155
  • RWUIRQ_MAX3421E.JPG
    RWUIRQ_MAX3421E.JPG
    46.9 KB · Views: 130

Hi,

I don´t think the host needs to suspend the bus.
Or do you do this because of power saving.?

In either way. Try to focus on the communication.
If everything works you may do optimisations later.


Klaus
 

Even in un-suspended mode, RWUIRQ not set when Barcode scanner sends data.
 

I have contacted the MAXIM for this issue. They told me that they did not check the module for Barcode Scanner. So, asked me to analyze the flow in PIC24FJ.. (used to communicate with scanner thru' USB) and implement / modify the code according to. I read somewhere else on the web that MAX3421E requires at least 10ms signal duration for enabling interrupt. The barcode scanner signal is less that 10ms. So, we cannot use MAX3421E for accesssing Barcode Scanner. So, I have dropped the idea of using MAX3421E and preferred to use PIC24FJ...uC.

Thank you all.
bye
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top