try this
Code:PAUSE 500 loop: Lcdout $fe, 1,"Hello" ' Display Hello Pause 2000 Lcdout $fe, 1,"John" Pause 2000 goto loop
try this
Code:PAUSE 500 loop: Lcdout $fe, 1,"Hello" ' Display Hello Pause 2000 Lcdout $fe, 1,"John" Pause 2000 goto loop
Hi John,
Try this, I couldn't get the config fuses right for mpasm, but I was able to get them right for the default assembler. it should workkeyword should.
JS
Code:@ DEVICE MCLR_OFF, XT_OSC, WDT_OFF, LVP_OFF, BOD_OFF, PWRT_ON, PROTECT_OFF DEFINE OSC 4 ' XT osc DEFINE LCD_DREG PORTB DEFINE LCD_DBIT 4 DEFINE LCD_RSREG PORTB DEFINE LCD_RSBIT 3 DEFINE LCD_EREG PORTB DEFINE LCD_EBIT 2 DEFINE LCD_BITS 4 ' Set number of lines on LCD DEFINE LCD_LINES 2 DEFINE LCD_COMMANDUS 2000 ' Set data delay time in us DEFINE LCD_DATAUS 100 TRISB=%00000000 ' all portb to output TRISA=%00000000 ' all porta to output ADCON1 = 7 ' or ADCON1 = %00000111 'Disable A/D converter ANSEL=%00000000 ' set all analog pins to digital CMCON=7 main pause 2000 Lcdout $fe, 1, "Hello" ' Display Hello pause 1000 LCDOUT $FE,1,"John" goto main END
Last edited by Archangel; - 12th December 2006 at 07:53.
Joe
The MPASM config fuses are in the p16f88.inc file in the Microchip\MPASM suite folder
AND NEVER EVER END A PROGRAM WITH A SINGLE END STATEMENT... use STOP OR an endless loopCode:_CONFIG1 EQU H'2007' _CONFIG2 EQU H'2008' ;Configuration Byte 1 Options _CP_ALL EQU H'1FFF' _CP_OFF EQU H'3FFF' _CCP1_RB0 EQU H'3FFF' _CCP1_RB3 EQU H'2FFF' _DEBUG_OFF EQU H'3FFF' _DEBUG_ON EQU H'37FF' _WRT_PROTECT_OFF EQU H'3FFF' ;No program memory write protection _WRT_PROTECT_256 EQU H'3DFF' ;First 256 program memory protected _WRT_PROTECT_2048 EQU H'3BFF' ;First 2048 program memory protected _WRT_PROTECT_ALL EQU H'39FF' ;All of program memory protected _CPD_ON EQU H'3EFF' _CPD_OFF EQU H'3FFF' _LVP_ON EQU H'3FFF' _LVP_OFF EQU H'3F7F' _BODEN_ON EQU H'3FFF' _BODEN_OFF EQU H'3FBF' _MCLR_ON EQU H'3FFF' _MCLR_OFF EQU H'3FDF' _PWRTE_OFF EQU H'3FFF' _PWRTE_ON EQU H'3FF7' _WDT_ON EQU H'3FFF' _WDT_OFF EQU H'3FFB' _EXTRC_CLKOUT EQU H'3FFF' _EXTRC_IO EQU H'3FFE' _INTRC_CLKOUT EQU H'3FFD' _INTRC_IO EQU H'3FFC' _EXTCLK EQU H'3FEF' _HS_OSC EQU H'3FEE' _XT_OSC EQU H'3FED' _LP_OSC EQU H'3FEC' ;Configuration Byte 2 Options _IESO_ON EQU H'3FFF' _IESO_OFF EQU H'3FFD' _FCMEN_ON EQU H'3FFF' _FCMEN_OFF EQU H'3FFE'
Here we don't know if the user use an external or want to use the internal OSC...
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Sorry about that mister_e, it got by me on the fourth paste, I had installed a goto main and then did a repaste and, oops left it out. As for mpasm config fuses . . . I kept getting errors using this formatOriginally Posted by mister_e
but not this exact code. I have edited above post.Code:@ __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _PWRTE_ON & _MCLRE_OFF & _LVP_OFF & _BODEN_ON
JS
Last edited by Archangel; - 12th December 2006 at 07:54.
Yeah F88 is a bit like some 18F, try something around those bellow
Code:' ' Pic Configuration ' ================= ' Program Configuration Register 1 @ __CONFIG _CONFIG1, _CP_OFF & _CCP1_RB0 & _DEBUG_OFF & _WRT_PROTECT_OFF & _CPD_OFF & _LVP_OFF & _BODEN_ON & _MCLR_OFF & _PWRTE_ON & _WDT_OFF & _INTRC_IO ' Program Configuration Register 2 @ __CONFIG _CONFIG2, _IESO_OFF & _FCMEN_OFF
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Hi Mister_e,
The 16F88 seems to be extra labor intensive and not suitable for newbies, as it has so many registers that require you to set and other little quirks, there are several open posts this month by people (like myself) who are a little short on experience, that are having trouble with this device. I think they would do better with a 16F628a / 648a or 16F876 / 877 etc. At least until they get their sealegs.![]()
To some extent that comment may be true but as the 16F88 is so versatile you can use it for many different projects so will quickly learn its quirks.Originally Posted by Joe S.
I was using 16F628 for 18pin projects and 16F877 for 40 pin projects.
I am now using 16F88 and 18F452.
My 40 pin project outgrew the capabilities of the 877 and my reason for getting started with the F88 was because it can be bootloaded. A real boon for developing code![]()
Keith
www.diyha.co.uk
www.kat5.tv
Bookmarks