Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com 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?

Status
Not open for further replies.

Kunal2

Junior Member level 3
Joined
Jun 21, 2011
Messages
27
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,512
hi

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

main:

TRISB = 0 'setting port b as output

eloop:
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

end.

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.

REgards
 

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
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top