Soft Uart error

Beta Testing discussion on mikroC PRO for dsPIC30/33 and PIC24.
Post Reply
Author
Message
Ptech
Posts: 83
Joined: 20 Jan 2008 16:44

Soft Uart error

#1 Post by Ptech » 14 Dec 2009 22:24

Hi.

I am using soft_uart as a debug output on some projects, but with the new
PRO version i got suspicious chars.

I have tested a code sequence here to show you.

It works simple by sending out 2 chars on each comport, the 1st is Soft_Uart and the 2nd is UART1, both on 9600 baud

On the Soft_Uart i got F9 A0 FF (3 bytes) and on UART1 i got FD 50 (2 bytes) witch is right 50 is ascii P

It might be that soft_uart use fault delay time regarding oscillator fq in compiler code ?

Here is the testcode

Code: Select all



/*
   Prog     Demo testing soft comms vs Uart comms
   uProc    dSPIC 30F3013
   FQ       Xtal 12.0000 MHz
   Osc      HS  No PLL
*/


char ch = 0XFD;     // Test HEX data char

char ASCIIP = 'P';  // Test Ascii letter P


void main() {

     UART1_Init(9600);      //Setup UART1 9600 8 N 1
     U1MODEbits.ALTIO = 1;  // Use alternative pins
     
     Soft_UART_Init(&PORTB, 0, 1, 9600, 0); //Setup Soft Comms on PortB0 / B1

     do {
     
     
        soft_uart_write(ch);      // Print out HEX value on soft comm 
        soft_uart_write(ASCIIP);  // Print out Ascii P on soft comm
        
        UART1_Write(ch);          // Do the same print on UART1 comms
        UART1_Write(ASCIIP);
        
        
        
        delay_ms(1000);          //Repeat every sec
     
     
     }
     while(1);
     

User avatar
anikolic
mikroElektronika team
Posts: 1775
Joined: 17 Aug 2009 16:51
Location: Belgrade
Contact:

#2 Post by anikolic » 15 Dec 2009 10:54

Hi,
Thank you very much for this observation, our developers will investigate this further and as soon as the issue is solved we will inform you on this forum topic.

Best regards,
Aleksnadar
Web Department Manager

User avatar
anikolic
mikroElektronika team
Posts: 1775
Joined: 17 Aug 2009 16:51
Location: Belgrade
Contact:

#3 Post by anikolic » 16 Dec 2009 08:46

Hi,
I'm glad to inform you that the source of the problem was located and our developers worked out the solution to the problem, and I can inform you that this will be corrected in the official release. Unfortunately, due to the complexity of the problem we are unable to provide you with a "quick fix", but be sure that official release will implement Soft_Uart and other soft libraries without erroneous behavior.

Thank you very much for your precious support!

Best regards,
Aleksandar
Web Department Manager

Ptech
Posts: 83
Joined: 20 Jan 2008 16:44

#4 Post by Ptech » 16 Dec 2009 19:24

OK !

Nice to hear, Aleksandar.

And when do you think a official release will be ? before end of January 2010 ?

//P

User avatar
anikolic
mikroElektronika team
Posts: 1775
Joined: 17 Aug 2009 16:51
Location: Belgrade
Contact:

#5 Post by anikolic » 17 Dec 2009 11:05

Hi,
We are planing the release by the end of 2009. If no major bugs are reported that could cause a major delay in release (this doesn't include asteroid impacts, because we are counting on them :D ).

Best regards,
Aleksandar
Web Department Manager

Post Reply

Return to “mikroC PRO for dsPIC30/33 and PIC24 Beta Testing”