ericgibbs Well-Known Member Most Helpful Member Jun 18, 2011 #21 OOPs, sorry, I don't know how to get Oshon code. Click to expand... This is the Oshonsoft Forum.. What did you use to run that image of the LCD that you posted.? Last edited: Jun 18, 2011
OOPs, sorry, I don't know how to get Oshon code. Click to expand... This is the Oshonsoft Forum.. What did you use to run that image of the LCD that you posted.?
aljamri Member Jun 18, 2011 #22 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
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.
ericgibbs Well-Known Member Most Helpful Member Jun 18, 2011 #23 hi, OK, I will use that hex file for a OSH test. Do you know how to use Oshonsoft Basic.?
ericgibbs Well-Known Member Most Helpful Member Jun 18, 2011 #24 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: Jun 18, 2011
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
aljamri Member Jun 18, 2011 #25 ericgibbs said: Do you know how to use Oshonsoft Basic.? Click to expand... 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! ericgibbs said: When running in simulation, the program is much slower, so any program delays take a very long time. Click to expand... I'm aware about this, for that I'm decreasing the clock Freq. into 1MHz and increasing the rate upto Extremly fast or Ultimate. ericgibbs said: for a test delete the delay 2000ms Click to expand... 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: Jun 18, 2011
ericgibbs said: Do you know how to use Oshonsoft Basic.? Click to expand... 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! ericgibbs said: When running in simulation, the program is much slower, so any program delays take a very long time. Click to expand... I'm aware about this, for that I'm decreasing the clock Freq. into 1MHz and increasing the rate upto Extremly fast or Ultimate. ericgibbs said: for a test delete the delay 2000ms Click to expand... 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 ?
ericgibbs Well-Known Member Most Helpful Member Jun 18, 2011 #26 I'm aware about this, for that I'm decreasing the clock Freq. into 1MHz and increasing the rate upto Extremly fast or Ultimate. **broken link removed** Originally Posted by ericgibbs **broken link removed** If you are using the code you posted, 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 ? Click to expand... 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: Jun 18, 2011
I'm aware about this, for that I'm decreasing the clock Freq. into 1MHz and increasing the rate upto Extremly fast or Ultimate. **broken link removed** Originally Posted by ericgibbs **broken link removed** If you are using the code you posted, 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 ? Click to expand... 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'
ericgibbs Well-Known Member Most Helpful Member Jun 18, 2011 #27 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
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]
aljamri Member Jun 18, 2011 #28 ericgibbs said: Decreasing the Sim clock rate to 1MHz will make it 4 times SLOWER! Click to expand... I put the clock speed back to 20MHz and got faster simulation . ericgibbs said: Can you tell me exactly what you are trying to do.? Click to expand... 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. ericgibbs said: You have a mixture of 'C' , ASM and some Basic ie; 'Save Settings' Click to expand... 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.
ericgibbs said: Decreasing the Sim clock rate to 1MHz will make it 4 times SLOWER! Click to expand... I put the clock speed back to 20MHz and got faster simulation . ericgibbs said: Can you tell me exactly what you are trying to do.? Click to expand... 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. ericgibbs said: You have a mixture of 'C' , ASM and some Basic ie; 'Save Settings' Click to expand... 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.