Oshonsoft LCD Setup

Status
Not open for further replies.
OOPs, sorry, I don't know how to get Oshon code.

This is the Oshonsoft Forum..
What did you use to run that image of the LCD that you posted.?
 
Last edited:
I've loaded the Hex. file into the program and set the LCD as per your suggestions and press F1 to run and get the image.

I've got the attached Hex. file but don't know is it what you ask or not.
 

Attachments

  • 123.hex
    2.9 KB · Views: 394
hi,
OK, I will use that hex file for a OSH test.

Do you know how to use Oshonsoft Basic.?
 
hi aljamri,
I see whats happening in Oshonsoft.

When running in simulation, the program is much slower, so any program delays take a very long time.

The program may appear to have stopped but its running in the delays loops, very slowly.

Can you write in Oshonsoft Basic.???

EDIT:
If you are using the code you posted, for a test delete the delay 2000ms
 
Last edited:
Do you know how to use Oshonsoft Basic.?
No, I'm loading Oshonsoft with Hex. files compiled either from MikroC or MPASM, but dont know that it has its own compiler or not!

When running in simulation, the program is much slower, so any program delays take a very long time.
I'm aware about this, for that I'm decreasing the clock Freq. into 1MHz and increasing the rate upto Extremly fast or Ultimate.

for a test delete the delay 2000ms
As usual You are right, when I deleted it, the program works fine and updating, but is this going to work in real circuit as well as on OshonSoft ?
 
Last edited:
Decreasing the Sim clock rate to 1MHz will make it 4 times SLOWER!

Leave out the long delay while you are using the OSH simulator, put it back in when getting ready to program a PIC.

Can you tell me exactly what you are trying to do.?

You have a mixture of 'C' , ASM and some Basic ie; 'Save Settings'
 
Last edited:
hi,
Using OSH basic this is all you need to show the adc on the LCD.
[CODE
Define CONF_WORD = 0x3f31

Define SIMULATION_WAITMS_VALUE = 1

AllDigital

Define LCD_LINES = 2
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 = 7
Define LCD_RWREG = PORTB
Define LCD_RWBIT = 6
Define LCD_READ_BUSY_FLAG = 1

Dim num As Word

ADCON0 = 0b11000000
ADCON1 = 0b10001111
TRISA = 0xff
TRISB = 0

Lcdinit

loop:
Lcdcmdout LcdLine1Home
Adcin 0, num

Lcdout #num, " "

Goto loop[/CODE]
 

Attachments

  • AAesp02.gif
    37.8 KB · Views: 440
  • aljamri1.bas
    552 bytes · Views: 424
Decreasing the Sim clock rate to 1MHz will make it 4 times SLOWER!
I put the clock speed back to 20MHz and got faster simulation .

Can you tell me exactly what you are trying to do.?
I'm trying to measure 1 to 5 volts as what I told you in https://www.electro-tech-online.com/threads/reading-4-20-ma-on-lcd-using-pic16f876a.119563/ ", and since I found Oshonsoft much easier than programming and testing real chip, I start testing here.

You have a mixture of 'C' , ASM and some Basic ie; 'Save Settings'
I dont know, as I told you, I used the hex file generated from Mikroc or MPASM and running the oshonsoft, as simple as this.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…