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

CY7C68013A Serial Communication Problem

Dear Friends,

I have written Serial communication program for cypress CY7C68013A which is not working, Please find the code below, if there is any more registers to be set please tell me,


        CPUCS = bmCLKSPD1; // 48 MHz

        CKCON = 0;// MOVX takes 2 cycles
        SCON0 = 0x50;
        TMOD |= 0x20;
        TH1   = 0xB2;// Baudrate @ 9600bps CLK=48MHz
        TR1   = 1;
        TI =1;
        RI =1;




        while(1)
        {

        printf("Hello World");
        }

Parents
  • I have completely read the cypress document and initialized the following registers, still the problem persists, do I need to initialize any more pins for my serial communication to work?? Please help...

    void init_uart(void)
            {
    
                             CPUCS =  bmCLKSPD1;    // 48 MHz
                             CKCON =  0x10;                 // TR1=1 divide factor by 1
                             SCON0 =  0x50;         // 8 bit Auto Reload mode UART
                             EICON |= 0x80;         // SMOD1=1
                             TMOD  |= 0x20;         // Timer 1 initialized to mode 2
                             TH1   =  0xEC;         // Reload value for 9600 baud rate at
                             TR1   =  1;            // Start the Timer 1
                             TI1   =  1;
                             RI1   =  1;
    
            }
    
    

Reply
  • I have completely read the cypress document and initialized the following registers, still the problem persists, do I need to initialize any more pins for my serial communication to work?? Please help...

    void init_uart(void)
            {
    
                             CPUCS =  bmCLKSPD1;    // 48 MHz
                             CKCON =  0x10;                 // TR1=1 divide factor by 1
                             SCON0 =  0x50;         // 8 bit Auto Reload mode UART
                             EICON |= 0x80;         // SMOD1=1
                             TMOD  |= 0x20;         // Timer 1 initialized to mode 2
                             TH1   =  0xEC;         // Reload value for 9600 baud rate at
                             TR1   =  1;            // Start the Timer 1
                             TI1   =  1;
                             RI1   =  1;
    
            }
    
    

Children