dsPIC4011 Software UART Problem

General discussion on mikroPascal for dsPIC30/33 and PIC24.
Post Reply
Author
Message
sonu2die45
Posts: 7
Joined: 04 Aug 2008 20:23

dsPIC4011 Software UART Problem

#1 Post by sonu2die45 » 06 Oct 2008 02:17

Hi,
I am having problems in getting the Software UART to function properly.
I am using this code...

void main() {
char *txt = "mikroe";
int i = 0;
int error;

// Initialize Software Uart communication
Soft_Uart_Init(&PORTF, 4, 5, 56000, 0);

// Write text to Software Uart
while(txt[i]){
Soft_Uart_Write(txt[i++]);
}

// Receive byte and send it back via Software Uart
while (1){
i = Soft_Uart_Read(&error);
if (!error)
Soft_Uart_Write(i);
else
Soft_Uart_Write('e'),Soft_Uart_Write(i);
}

With the settings as Oscillator:XT-PLL8 on a 10.000MHz
Processor : dsPIC30F4013

Please help me with this. I do not see any problems in my hardware connection.
Regards
Vivek

sonu2die45
Posts: 7
Joined: 04 Aug 2008 20:23

#2 Post by sonu2die45 » 06 Oct 2008 14:32

I can see something written on the screen except for the correct result

sonu2die45
Posts: 7
Joined: 04 Aug 2008 20:23

#3 Post by sonu2die45 » 16 Oct 2008 03:31

Set the HS_PLL Flag. Thank You Marko Medic

Post Reply

Return to “mikroPascal for dsPIC30/33 and PIC24 General”