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.
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...
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...
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.
hi,
Look at this draft Oshonsoft basic manual I started a long time again ago.
Use the hyper links to navigate the file,
Add and Edit it to suit yourself.
hi,
Change the PIC type to 16F876A, 4 mHz clock.
Copy/paste this TT4.bas into the basic window, BEFORE you press F9, close the LCD module if its showing.
Then press F9.
Select the LCD module from the TOOLS and accept it.
Using TOOLS, select micro controller view.
Run the program in Ultimate.
On the PIC view near AN0 you will see a letter 'A' , left click it, as small box will appear, use the slider to change the adc input voltage, the LCD will display the values..
Dont rush it, remember in simulation the programs run a lot slower.
hi,
Change the PIC type to 16F876A, 4 mHz clock.
Copy/paste this TT4.bas into the basic window, BEFORE you press F9, close the LCD module if its showing.
Then press F9.
Select the LCD module from the TOOLS and accept it.
Using TOOLS, select micro controller view.
Run the program in Ultimate.
On the PIC view near AN0 you will see a letter 'A' , left click it, as small box will appear, use the slider to change the adc input voltage, the LCD will display the values..
Dont rush it, remember in simulation the programs run a lot slower.
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.
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