faysal_002299
New Member
Dear all,
I am using dsPIC30F3011 for motor control. As this MCU doesn't support any usb communication, I am using another Atmel MCU (AT90USB82/162) for the USB communication with the host PC. Intercommunication between the 2 MCU's is done by SCI (UART).
The problem is in case of data exchange I am observing some weird things. Say, when I send a sequence of numbers (8 bit) from MCU to PC, the data I am reading from my host is ok for the last 4 bits but for the upper 4 bits it's not matching with the original data. For examle,
Data Supposed to receive: 0x11, 0x22 0x33 0x44 0x55 0x66 0x77 0x88 0x99 0xAA 0xBB 0xCC 0xDD 0xEE 0xFF
Received Data: 0x91 0xA2 0xB3 0x84 0x95 0xA6 0xB7 0xC8 0xD9 0xCA 0xDB 0xEC 0xFD 0xEE 0xFF
[This is happening for all sets of number. That's to say, instead of 0x1 in the upper 4 bit I am always getting 0x9, instead of 0xA in the upper 4 bit I am always getting 0xC no matter what's in the lower 4bit. But in case of 0xE or 0xF in the upper 4bit I am receiving 0xE and 0xF (nothing's wrong here). On the other hand, in case of lower 4bit there is never any problem]
Please tell about all the possible reasons for happening this kind of thing so that I can do the troubleshooting.
waiting for your kind reply. Let me know if you need any further info.
Thanks in advance
Faysal
I am using dsPIC30F3011 for motor control. As this MCU doesn't support any usb communication, I am using another Atmel MCU (AT90USB82/162) for the USB communication with the host PC. Intercommunication between the 2 MCU's is done by SCI (UART).
The problem is in case of data exchange I am observing some weird things. Say, when I send a sequence of numbers (8 bit) from MCU to PC, the data I am reading from my host is ok for the last 4 bits but for the upper 4 bits it's not matching with the original data. For examle,
Data Supposed to receive: 0x11, 0x22 0x33 0x44 0x55 0x66 0x77 0x88 0x99 0xAA 0xBB 0xCC 0xDD 0xEE 0xFF
Received Data: 0x91 0xA2 0xB3 0x84 0x95 0xA6 0xB7 0xC8 0xD9 0xCA 0xDB 0xEC 0xFD 0xEE 0xFF
[This is happening for all sets of number. That's to say, instead of 0x1 in the upper 4 bit I am always getting 0x9, instead of 0xA in the upper 4 bit I am always getting 0xC no matter what's in the lower 4bit. But in case of 0xE or 0xF in the upper 4bit I am receiving 0xE and 0xF (nothing's wrong here). On the other hand, in case of lower 4bit there is never any problem]
Please tell about all the possible reasons for happening this kind of thing so that I can do the troubleshooting.
waiting for your kind reply. Let me know if you need any further info.
Thanks in advance
Faysal