Ok, lew
Seems you use MPASM as an assembler ...
so don't use PM commands !
should Work somewhat better ...Code:@ __config _CONFIG1, _HS_OSC & _WDT_ON & _MCLRE_ON & _LVP_OFF & _CP_OFF
Alain
Ok, lew
Seems you use MPASM as an assembler ...
so don't use PM commands !
should Work somewhat better ...Code:@ __config _CONFIG1, _HS_OSC & _WDT_ON & _MCLRE_ON & _LVP_OFF & _CP_OFF
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
You think this MikroBASIC code is more difficult than what you came up with?
Code:program Lcd_demo main: Lcd_Init(PORTB) ' Initialize LCD connected to PORTB Delay_ms(500) While true Lcd_Cmd(LCD_CLEAR) ' Send command to LCD "clear display" Lcd_Out(1,1,"Hello") ' Print txt to LCD, 1st row, 1st column Delay_ms(500) Lcd_Cmd(LCD_CLEAR) ' Send command to LCD "clear display" Lcd_Out(2,1,"World") ' Print txt to LCD, 2nd row, 1st column Delay_ms(500) Wend end.
Last edited by rmteo; - 7th December 2009 at 17:32.
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Sorry I forgot totally about that, PM would not work at all,because I have an X64 system
For some reason @ __config _CONFIG1, _HS_OSC & _WDT_ON & _MCLRE_ON & _LVP_OFF & _CP_OFF will not work
If I add it at the beginning I get Error [118] c:\pbp\tests\cdtes~1.asm 108 : Overwriting previous address contents (2007)
If I put this at the beginning of the program it compiles with no errors but won't work.
I checked the datasheet of the 16f887 (using this because it came supplied with it) and I THINK I've configured all registers on PortBCode:Define Device 16f887 Define OSC 8 adcon1 = 7 PORTB = %00000000 TRISB = %00000000 IOCB = 0 CM1CON0 = 0 CM2CON0 = 0 CCP1CON = 0 CM2CON1 = 0 INTCON = 0
It would be good if I could change LCD pins as suggested but unfortunately not possible on this board.
And I need to learn what is wrong so next time I won't (hopefully) need to ask for help.
Yes ...If I add it at the beginning I get Error [118] c:\pbp\tests\cdtes~1.asm 108 : Overwriting previous address contents (2007)
With MPLAB you also must comment the PBP default config in the relevant .inc file ...
see details here:
http://www.picbasic.co.uk/forum/showthread.php?t=543
...
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Got it working at last
Thanks for all the help everyone.
I think the problem I had was I was trying to overwrite the inc files without realising.
I now have @ __config _CONFIG1, _HS_OSC & _WDT_ON & _MCLRE_ON & _LVP_OFF & _CP_OFF
as the config
However the programmer always tried to program in low voltage mode, I have to manually set it to off.
I'd like to sort that out, but I can live with it if needed.
Edit: Works with 16F877A but not 16F887 for some weird reason!
found it!
This works for the 16f887
However still got the programming issued I've got to set the low power programming to off manually and the oscillator to HSCode:@ __config _CONFIG1, _HS_OSC & _WDT_ON & _MCLRE_ON & _LVP_OFF & _CP_OFF Define device 16F887 Define OSC 8 ANSEL=0 ' A/D disabled for ANS0 to ANS7 ANSELH=0 ' A/D disabled for ANS8 to ANS13 CM1CON0 = 0 ' Disable comparators CM2CON0 = 0 ' These default to disabled at POR, but just in case CM2CON1 = 0 adcon1 = 7 IOCB = 0 INTCON = 0 ansel = 0 anselh = 0 PORTB = %00000000 TRISB = %00000000
Last edited by lew247; - 7th December 2009 at 19:51.
May be you should have a look to the upper part of the MPLAB Configuration bits window ...
an option to choose ...
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Bookmarks