PIC Simulator

Status
Not open for further replies.
the last one ( LCDintr1.bas )


not yet ,

hi,
Its at the top the program.?
Define LCD_LINES = 4
Define LCD_CHARS = 16
Define LCD_BITS = 4
Define LCD_DREG = PORTB
Define LCD_DBIT = 0
Define LCD_RSREG = PORTB
Define LCD_RSBIT = 4
Define LCD_EREG = PORTB
Define LCD_EBIT = 5
Define LCD_RWREG = PORTB
Define LCD_RWBIT = 6

If you are using the Basic Complier, let the SIM set it for you.
 

Attachments

  • AAesp03.gif
    8.7 KB · Views: 377
Last edited:
its works

i take a picture of it

Well done TT.!

Did you download the VB runtime and my external modules.???

Here is another program.
Note: the use of the ASM command in Oshonsoft Basic.

This program demo's the PIC timer as a Frequency Counter, TTFreq_LCD

Use 16F877A PIC, load this into a new assembler window, F9 to compile.

Select LCD, Micro view from TOOLS.

Run the program

On the 'T' on the PIC view pin 15, T1CKI, click the 'T' on and off a few times, the LCD will display a frequency count.
 

Attachments

  • TTFreq_LCD1.bas
    4.2 KB · Views: 400
Last edited:
why did the LCD just showing message like this " @@@@@@@ " ??
 
Last edited:
why did the LCD just showing message like this " @@@@@@@ " ??

hi,
Check the LCD set up window make sure the pins are correct, also the PIC type and the crystal frequency,,, let me know.
 

Attachments

  • AAesp06.gif
    9.3 KB · Views: 353
Last edited:
hi,
Check the LCD set up window make sure the pins are correct, also the PIC type and the crystal frequency,,, let me know.

Data lines ---> PORTB
RS Line ---> PORTB,2
E Line ---> PORTB,3
R/W Line ---> PORTB,1
Interface: 4-bit, Low

is it right ?

EDIT:
i think the wrong is the Interface setting

what is the next lesson ?
 
Last edited:
Data lines ---> PORTB
RS Line ---> PORTB,2
E Line ---> PORTB,3
R/W Line ---> PORTB,1
Interface: 4-bit, Low

is it right ?

EDIT:
i think the wrong is the Interface setting

what is the next lesson ?

hi,
We should debug the TTFReq_LCD before we move on,
Check my EDIT image,.... note the 4 bit HIGH!!!!!
 
hi
what does the different between of trhee sertting ?

Look at this image... look in the outlined box.....

you have.
Data lines ---> PORTB
RS Line ---> PORTB,2
E Line ---> PORTB,3
R/W Line ---> PORTB,1
Interface: 4-bit, Low
 

Attachments

  • AAesp06.gif
    9.4 KB · Views: 417
Last edited:
hi,
Look at this stepper motor basic.
Select 16F877A, no LCD required.

Select from TOOLs 'stepper motor phase' module.

F9 and run, use a slower RATE to see the motor spin.
 

Attachments

  • TT_step_mtr1.bas
    631 bytes · Views: 361
  • AAesp08.gif
    9.2 KB · Views: 452
hi,
Look at this I2C program

Use 16F877A, select from Tools I2C EEPROM, and after F9 select LCD from tools.

Set the SDA and SCL pins in the I2C EEPROM module
 

Attachments

  • TT_I2C.bas
    860 bytes · Views: 352
  • TT_I2C.gif
    22.5 KB · Views: 514
Last edited:
its work

but i dont know anything about 12C and Stepper motor

what is it for ?

hi,
The reason for the stepper motor and I2C is to show you how to use the Sim modules,

Can you answer my question about the external modules from my Blog links, did you download and install them.??
 
yes i download it
OK, run the 16FAnalog.exe module, if you have not already got the Sim running, the model will start Oshonsoft.
Load, F9 and run LCDintr1.bas [ yesterdays program]
Use the push buttons on the 16FAnalog module to vary the AN0 and AN1 adc inputs.
By pressing and holding down the left mouse button on the +/- [red/green] the adc value will increase/decrease.

Try it and let me know how it goes.
 

Attachments

  • AAesp01.gif
    12.8 KB · Views: 393
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…