The following code not working. In the software simulator is ok, but in the PIC, don't work.
I use mP for dsPIC 6.0, dsPIC Pro2 board with 30F6014.
Code: Select all
program test_pr;
var i,j,data,data1:byte;
begin
uart1_init(9600);
trisb:=0;
i:=0;
j:=6;
data:=0;
data1:=172;
for i := 7 downto 1 do
begin
data.i := data1.j;
if j > 0 then j:=j-1 else break;
end;
latb:=data; // Software simulator value: 88, but the real: 0
uart1_write_char(data);
end.