The 887 has analog inputs on PORTB.
So you need to enable Digital Inputs for the LCD to work on those pins ... or the I2C (RB1,RB2).
Code:ANSELH = 0
The 887 has analog inputs on PORTB.
So you need to enable Digital Inputs for the LCD to work on those pins ... or the I2C (RB1,RB2).
Code:ANSELH = 0
DT
HI, thanks for the help, I am getting a little bit further I have change my define section:
'/////////////////////////
'// Define section //
'/////////////////////////
@ device pic16F887, HS_OSC
Define OSC 8 ' Set clock speed
ANSELH = 0
Here is the error:
Executing: "C:\PBP2.60\PBPMPLAB.BAT" -ampasmwin -k# -p16F887 "C:\PBP2.60\eeprom.bas"
Executing: "C:\PBP2.60\PBPW.EXE" -ampasmwin -k# -p16F887 "C:\PBP2.60\eeprom.bas"
PICBASIC PRO(TM) Compiler 2.60A, (c) 1998, 2010 microEngineering Labs, Inc.
All Rights Reserved.
ERROR: Unable to execute mpasmwin.Warning[207] C:\PBP2.60\EEPROM.ASM 170 : Found label after column 1. (device)
Error[122] C:\PBP2.60\EEPROM.ASM 170 : Illegal opcode (pic16F887)
Warning[202] C:\PBP2.60\EEPROM.MAC 132 : Argument out of range. Least significant bits used.
Halting build on first failure as requested.
BUILD FAILED: Tue Nov 30 06:53:30 2010
I just tested the same code I posted within Windows XP- Dos window. using the command pbp -p16F887 eeprom.bas.. I worked as it did yesterday. At home I have Windows 7, so I had to use Mplab and the same problem free program under windows XP is not compilable under windows 7...
any thoughts
.... the code under XP compiles with or without ANSELH = 0
K
Is not correct for MPASAM.Code:@ device pic16F887, HS_OSC
Try
Code:@ __config _CONFIG1, _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_OFF & _LVP_OFF & _CP_OFF OSCCON = %01110000 '8 Mhz DEFINE OSC 8
Last edited by mackrackit; - 30th November 2010 at 13:58. Reason: Setup for internal OSC
Dave
Always wear safety glasses while programming.
Hi,
thats the same line from the Inc file: 16F887.INC except for the oscillation.
Why doesn't it work in MPlab ??? does it read the INC files ??? maybe there a configuration that I need to point to that file ??
K
Because @ DEVICE is for PMWhy doesn't it work in MPlab ???
The inc file tells you that.
Dave
Always wear safety glasses while programming.
Ooo yes in the comment on topI will try this . I would rather learn MPlab then installing XP on my Win 7 machine.
Bookmarks