This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

C8051 USB Programme

Hi all,

i am a 3rd year NYP student and i am currently doing a project that needs to link transmitter USB to a receiver USB(example tx to rx) in silicon laboratories. I has been trying for a month and yet no results has shown. I not too sure which part i did wrong. Seeking helper to solve my problem, i am just a beginner :( Do anyone doing similar things like me? Many thanks.

C8051 microcontroller
using C language

//Transmitter
#include <f200.h>

void main()
{

TMOD = 0x20; SCON = 0x50; TH1 = 0xFD; TL1 = 0xFD; TR1 = 1;

while(!TI); TI = 0; SBUF = 0x4F;
}

//Receiver
#include <f200.h>

void main()
{ TMOD = 0x20; SCON = 0x50; TH1 = 0xFD; TL1 = 0xFD; TR1 = 1;

while(!RI); RI = 0; return SBUF;
}

These codes may look very wrong but really need helps from you guys. Thanks
MJ