Hello i have probem with Soft_Uart library and pic 16f819

Beta Testing discussion on mikroPascal.
Post Reply
Author
Message
alcidesramos
Posts: 272
Joined: 17 Feb 2009 02:39
Location: Colombia
Contact:

Hello i have probem with Soft_Uart library and pic 16f819

#1 Post by alcidesramos » 28 Aug 2009 02:36

Hello i have i problem the pic 16f819, when use Soft_Uart. his send bad codes, i try with other pic and work ok the problem is with 16f819.

I use the 16f819
clock=int rc io 8Mhz.

the code is
program acelelometro;

begin
OSCTUNE:=0;// SCILADOR INTERNO A FRECUENCIA CENTRAL
//CONFIGURACION DE FRECUENCIA DE OSCILACION INTERNA A 8 MEGA.
OSCCON.IRCF2:=1;
OSCCON.IRCF1:=1;
OSCCON.IRCF0:=1;

OPTION_REG:=0;
ADCON0:=0;
adcon1:=6;
PCON:=0;
INTCON:=0;
PIE1:=0;
PIE2:=0;
PIR1:=0;
PIR2:=0;
TRISA:=0;
TRISB:=0;
TRISB.0:=1; // ENTRADA PULSO
Soft_Uart_Init(PORTB, 3, 4, 2400, 0);

while true do
begin
soft_Uart_Write($17);
Soft_Uart_Write('A');
delay_ms(2000);
end; //while true


end.

the pic never send the DATA OK.
i THINK THAT THE PCI 16F819 HAVE PROBLEM WITH Soft_Uart.
PLEASE CHECK IT.

alcidesramos
Posts: 272
Joined: 17 Feb 2009 02:39
Location: Colombia
Contact:

#2 Post by alcidesramos » 28 Aug 2009 02:37

THIS PROBLE IS IN 8.1 VERSION.

User avatar
nikola.kostic
mikroElektronika team
Posts: 433
Joined: 11 Aug 2009 12:12

#3 Post by nikola.kostic » 01 Sep 2009 08:20

I advise you to install mikroPascal Pro v 2.50 (it can be installed independently of version you already have installed), and test your code with this version. You can download it here:
http://www.mikroe.com/en/compilers/mikropascal/pro/pic/

I tested your code and it works fine (writing $17 and A) on EasyPIC5 board with PIC16F818 (very similar to your chip) and built with mikroPascal Pro v 2.50. I couldn't connect pins RB3 and RB4 as you did, so I used RB4 and RB5 for Rx/Tx.

alcidesramos
Posts: 272
Joined: 17 Feb 2009 02:39
Location: Colombia
Contact:

#4 Post by alcidesramos » 01 Sep 2009 10:38

thank you. please try in mikropascal 8.3 beta for fix the problem.
I try in 2.5 and ok.

Post Reply

Return to “mikroPascal Beta Testing”