Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC Simulator

Status
Not open for further replies.
as usual
12F629
and the freq is 4 mhz
hi,
Run Oshonsoft.
On the menu bar click OPTIONS, then SELECT MICRO, find the 12F629 PIC on the displayed table of PIC's.

Also in the OPTIONS, select CHANGE CLOCK FREQ, make it 4.

On the menu bar click TOOLS, then BASIC COMPILER.
This will show a blank Basic window, this is where you type your program code.

The 12F629 is too simple to explain the features of Oshonsoft fully.
For teaching I would suggest the 16F628A PIC, I can then post some written programs for you to try.!
Is that OK.?
 
hi,
Run Oshonsoft.
On the menu bar click OPTIONS, then SELECT MICRO, find the 12F629 PIC on the displayed table of PIC's.

Also in the OPTIONS, select CHANGE CLOCK FREQ, make it 4.

On the menu bar click TOOLS, then BASIC COMPILER.
This will show a blank Basic window, this is where you type your program code.

The 12F629 is too simple to explain the features of Oshonsoft fully.
For teaching I would suggest the 16F628A PIC, I can then post some written programs for you to try.!
Is that OK.?
yes its ok

but i never use BASIC programming laguage
 
Last edited:
hi,
Look at this simple 628A Basic program, select the 16F628A from the OPTIONS, select the Basic Compiler and copy and paste the attached Basic program into the Basic Compiler window.
When you have done that, press keyboard 'F9' this will compile and load the program into the sim.
Using the TOOLS menu, load the LCD module, now just run the program, I always set the RATE from the menu as ULTIMATE

EDIT:
If you use windows explorer, you will see that Oshonsoft also creates an 'asm' file, 'lst' and 'hex' file.
The 'asm' file is useful if you you prefer to work in assembler, the sim also has an 'assembler' window.
 

Attachments

  • TT1.bas
    547 bytes · Views: 501
Last edited:
hi,
Look at this simple 628A Basic program, select the 16F628A from the OPTIONS, select the Basic Compiler and copy and paste the attached Basic program into the Basic Compiler window.
When you have done that, press keyboard 'F9' this will compile and load the program into the sim.
Using the TOOLS menu, load the LCD module, now just run the program, I always set the RATE from the menu as ULTIMATE

EDIT:
If you use windows explorer, you will see that Oshonsoft also creates an 'asm' file, 'lst' and 'hex' file.
The 'asm' file is useful if you you prefer to work in assembler, the sim also has an 'assembler' window.
hi eric
thanks , it works
it seems basic laguage is really easy
i can display another massage with that , right ?
and , what is the next lesson ? :D
 
hi TT,
Well done.
Look at this extra work on the LCD.

EDIT:
Look thru these notes for the LCD.

When simulating keep the delays WAITMS [ wait millisecs] short so it runs faster.
 

Attachments

  • TT2.bas
    789 bytes · Views: 423
  • TTtxt1.txt
    6.3 KB · Views: 578
Last edited:
hi TT,
Well done.
Look at this extra work on the LCD.

EDIT:
Look thru these notes for the LCD.

When simulating keep the delays WAITMS [ wait millisecs] short so it runs faster.
hi
it works too
i view the asm file that generated by it , and it was so long
BASIC IS REALLY easy :D:D
what is the next lesson ?
 
hi TT,
Next bit,
From the TOOLS select HARDWARE UART, load and run this program, its LCD and UART output...


EDIT:
On the menu OPTIONS
TICK, Save positions, Save always on top,,

On the AUTOSTART options, from the window, tick the boxes that you want at start up.

As an experiment click BASIC PROGRAM TRACKING from the OPTIONS,,, dont leave it on as it slows down the sim...
 

Attachments

  • TT3.bas
    816 bytes · Views: 430
Last edited:
hi TT,
Next bit,
From the TOOLS select HARDWARE UART, load and run this program, its LCD and UART output...


EDIT:
On the menu OPTIONS
TICK, Save positions, Save always on top,,

On the AUTOSTART options, from the window, tick the boxes that you want at start up.

As an experiment click BASIC PROGRAM TRACKING from the OPTIONS,,, dont leave it on as it slows down the sim...
hi eric
its works too
its can counting ( to 255 i think ) :)
and also display hello in uart simulator :D
i delete some comment because i cant past from 50 lines :(
so , what is the next lesson ? :)
 
Last edited:
hi TT,
Same program but you can send a string from the HARDWARE uart to the LCD.
Run the program and when its displays 'send a string', use the SEND STRING cmd in the hardware uart.
if the string is over 16 characters in length it will display or you can end a short string with a '.' full stop character at the end and it will display
 

Attachments

  • TT3.bas
    913 bytes · Views: 424
hi TT,
Same program but you can send a string from the HARDWARE uart to the LCD.
Run the program and when its displays 'send a string', use the SEND STRING cmd in the hardware uart.
if the string is over 16 characters in length it will display or you can end a short string with a '.' full stop character at the end and it will display
hi eric
sorry for late respond
i test it on the simulator
its work , but i think we need to add reset button :)
so what is the next lesson ?
i wondering what is analog input for :)
 
hi,
Run TT3.bas then close the Basic compiler window, use TOOLS and open the Assembler window, copy and paste this TT3.asm file into the window.

Press F9 and it will assemble, the use the FILE on the menu bar, the LOAD FILE, double click the tt3.asm name and the file is ready to run.
 

Attachments

  • TT3.asm
    5.7 KB · Views: 385
hi,
Run TT3.bas then close the Basic compiler window, use TOOLS and open the Assembler window, copy and paste this TT3.asm file into the window.

Press F9 and it will assemble, the use the FILE on the menu bar, the LOAD FILE, double click the tt3.asm name and the file is ready to run.
i try to assemble it using PIC IDE which has a plug in / connected
to MPASM and it converted too
so, see you tomorrow , maybe we can continued it tomorrow , i need to sleep :)
 
Status
Not open for further replies.

Latest threads

Back
Top