PIC Simulator

Status
Not open for further replies.
Is that why it skips over? It just decides it's not going to wait the 5000 ?

Though, even at 5 it just skips over.
 
Last edited:
Hi,

Do you mean software simulator? Matlab does that too, free from Microchip.
 
Is that why it skips over? It just decides it's not going to wait the 5000 ?

Though, even at 5 it just skips over.
hi s87,
I am wondering why you would want to have delay loop for 5 seconds.???

If this line Define SIMULATION_WAITMS_VALUE = 1 is placed somewhere within the program header, Oshonsoft will use a value of WaitMs 1.

If you want to, change it to a value from 1 to 10, or for a promming a PIC make it =0 or delete the line.

After you have used Oshonsoft for a while, you can work out how the WaitMs are stretched out, mine runs at about 20 times slower than the 'real' world times. Depends upon the speed of your PC..

EDIT:
So for a 5sec delay at 20, that would be a 5000mS/20 >> WaitMs 250

You can check your real times by lookingat the Sim window, see this image.
 

Attachments

  • AAesp01.gif
    7.8 KB · Views: 322
Last edited:
I just collected around 50 $
but i will recieve it tonight ( here is 15:00 for now )
not too long before we continue again
 
I just collected around 50 $
but i will recieve it tonight ( here is 15:00 for now )
not too long before we continue again
hi,
I hope you are reading the Oshonsoft Basic manual.??
Do you have Microsoft Word on your PC.???
 
of course i have

hi TT,
Load this TTpt2_1.asm into the Sim, set the PIC to 16F628A first and clock at 4mHz.
Set up the LCD as shown in the image.
Assemble using F9, Load and Run.

Note the 'conditional' assembly in the listing.
Added some Macro's for you to try...
 

Attachments

  • TTpt2_1.asm
    4.7 KB · Views: 301
  • TTpt2_1.gif
    9.3 KB · Views: 315
hi eric

what is macro for ?
 
hi eric

what is macro for ?

hi,
Macro can be used where a 'section' of program is used a number of times within the text.
A simple example is the bank0 macro
Code:
bank0 macro
    bcf STATUS, RP0
    bcf STATUS, RP1
    endm
Instead of typing in the bcf xxxx and bsf xxxx every time you want to go bank0
you type in bank0.
When the assembler reads bank0, it generates the contents of the macro into the listing/hex file.

With this macro you can pass a delay value
Code:
;delay loop 1 To 255 msec
loopms  macro msec
    movlw msec
    movwf cntr0
    Call wait_ms
    endm
When you enter
loopms .10 ; the macro will use the decimal 10 as the delay value = 10mSec
 
its work , thanks

i just get the software some minute ago
 
its work , thanks

i just get the software some minute ago

i will test the second one
 

I was wanting to do this because it was running so quickly. It was going

Hey
0
1
2
3
etc

I was wanting it to go
Hey
.
.
.
0
1
2
3
4
etc

So you could read the text before hand. I can't try your suggestion right now but I will later. thanks
 
up to you

hi,
It takes a little while to prepare.
hi
This short prog uses TMR1 interrupts.
Select 16F876A
Load the LCDintr1.asm into a new assembler window and press F9 to compile.
Select from TOOLS
Micro view
LCD
Hardware Uart
Run the program in Ultimate
Click on AN0 and/or AN1 on the micro view window, adust AN0 and AN1 and you should see the
values on the LCD.

NOTE:
I have shortened the TMR1 count in order to speed up the Sim
Remember the the TMR1 interrupts at FF > 00 roll over, so the higher the count loaded into the TMR1 the shorter the interrupt interval
 

Attachments

  • LCDintr1.bas
    3 KB · Views: 297
hi,
If you use some of my external Oshonsoft modules it will make your testing easier.

Go to to this Blog link and download and install, get the free VB5 runtime files from the web and install.

This module enables you to adjust the ADC inputs in real time without the Micro View window
https://www.electro-tech-online.com...oft-simulator-16fanalog3-external-module.html


This module is for 4, push button/switch inputs
https://www.electro-tech-online.com...oft-simulator-16fkeypad4-external-module.html

This module is for 8, push button/switch inputs
https://www.electro-tech-online.com...oft-simulator-16fkeypad8-external-module.html

NOTE: you only need to intstall the VB5 runtime files once, when you have done that I can post 'exe' files
for other modules.
 
sorry for late respond ,

my internet just die for some hours

can you tell me the pin configuration for the lcd module ?
 
Last edited:
hi,
I thought you had gone to bed.

Which program LCD module.?

EDIT:
Do you mean the actual LCD.
Look at this pdf.
 

Attachments

  • how2lcd1.pdf
    240.7 KB · Views: 427
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…