software simulator and register ...

Beta Testing discussion on mikroPascal.
Post Reply
Author
Message
piort
Posts: 1379
Joined: 28 Dec 2005 16:42
Location: Laval,Québec,Canada,Earth... :-)
Contact:

software simulator and register ...

#1 Post by piort » 23 Feb 2009 23:31

hi,
i have try this code in the software simulator .... because that dosent work on EP5...

Code: Select all

program test;

var i : byte ;

procedure init;

begin
osccon:= %01110000;   // osc int 8mhz
osctune.pllen := 1;   // pll 4x donc programme a 32 mhz

ADCON0 := 0 ;
ADCON1 := %00001111;  //  all digital
CMCON  := 7;
TRISA := %00000000;         //porta output
portA := %00000000;
TRISB := %11000000;   // port B configuré lcd
TRISC := %11111111;   // port C configuré comme entrée
portc := 0 ;
end;


begin

while true do
begin
for i := 0 to 7 do
begin
if porta.i = 0 then porta.i := 1 else porta.i := 0;
delay_ms(30);
end;
end;

end.
and that work fine in the simulator....

to make that working in real, you have to use the Init procedure before the while loop. It is possible to make the simulator have to consider the register parameter ?

have a nice day

goran.marinkovic
mikroElektronika team
Posts: 265
Joined: 25 Nov 2008 09:09

#2 Post by goran.marinkovic » 26 Feb 2009 08:51

Hi,

I understand you, and I know where is the problem.
I can explain you.
Every MCUs is configured differently, so then we should write software simulator for every MCU, but there is a lot of MCUs and we do not have much time for that.
But we have our mikroICD Debugger, which is so good,
and shows that in real time and real system.

Regards

piort
Posts: 1379
Joined: 28 Dec 2005 16:42
Location: Laval,Québec,Canada,Earth... :-)
Contact:

#3 Post by piort » 26 Feb 2009 12:05

hi Goran,

thx for the reply
But we have our mikroICD Debugger, which is so good,
and shows that in real time and real system.
i know that but is hard to bring my EP5 in airplane, bus or train... Sometime, when im on the road, i like to open my laptop and make some code...so the software simulation is more portable then the hardware... And try to plug a dev board in plane and all around you ppl think you are a terrorist making a bomb... :roll:

but there is a lot of MCUs and we do not have much time for that.
maybe is why i have oshon product in my laptop....

have a nice day ;-)

Post Reply

Return to “mikroPascal Beta Testing”