Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Is led flashing possible with oshon simulator?

Not open for further replies.


Junior Member level 3
Jun 21, 2011
Reaction score
Trophy points
Activity points

i wrote a program in mikroBasic and tried simulating it on oshon simulator. However only the leds are lighting but they are not flashing. Can u please help??

program Blinking_leds


TRISB = 0 'setting port b as output

PORTB = $FF 'lighting all leds in port B
Delay_ms(1000) 'putting a delay of 1 sec
PORTB = $00 'switching off all leds
Delay_ms(1000) 'putting a delay of 1 sec

goto eloop 'looping endlessly


the above code was written in mikroBasic. However upon simulating with oshon software desired results are being obtained. The leds are not flashing on and off. With mikroC there are inbuilt delays,suppose delay of a sec(delay_1sec). This helps to simulate the program as desired. How can this problem be solved with mikroBasic? Are there in built delays in mikroBasic like in mikroC to overcome the above mentioned problem??? I am also including the mikroC program i have written for the same result. Thanks for replying.

void main() {
TRISB=0xFF; 'setting port b as output port
while (1) {
PORTB=0xFF; 'lighting all leds in port b
Delay_1sec; 'using in built delay of 1 sec instead of user defined delay
PORTB=0x00; 'switching off all leds in port b
Delay_1sec; 'using in built delay of 1 sec instead of user defined delay

did you set the 'rate' to ultimate ? (in oshonsoft simulator)

In oshonsoft, even if you set simulation speed to ultimate, then also, it will take 'about' 10 minutes to simulate a 1 second delay...
So better try to give delays like 1ms or such small delays and observe it.....

cool it works.....Thanks for the reply....And that was pretty fast...This is a great forum with very helpful people....

Why not try out real pic simulator **broken link removed**, you can try it for free and it runs faster that oshon simulator

I downloaded the real pic simulator but i cant make it work. I looked on youtube but there real pic project file is being opened. How to create a real pic project file?? I have worked only with hex files so far.

Your help will be highly appreciated.


I tried the real pic simulator yesterday, but don't know why, LCD is now working....but is is working in hardware and oshonsoft..... any idea?@cubanflyer
I configured the LCD pins correctly......

Dear cubanflye,

Do you have experiences with rea pic simulator
I need to know, do you have any experience with RTC in real pic simulator
is it work

Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to