the code is the example in pbp book lcdout pg 94
wiring checks ok using internal osc on 628a
the code is the example in pbp book lcdout pg 94
wiring checks ok using internal osc on 628a
Did you add CMCON=7 ?
Is any pull-up resistor on RA.4?
Did you add a start-up delay for the LCD between 500mSec and 2 Second before using the first LCDOUT?
Are you sure of your Config Fuse setting for the MCLR pin and Internal OSC?
...
...
...
Are you sure your LCD controller is compatible with the Hitachi one?
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
yes to the first ones ???? how do you set config fuse never seen this one in the manual?? does anyone else think the manual is very weak and not for the newbe
The config isn't the easiest thing to set. Here's how I do it:
First, I set my assembler to MPASM. You'll find a tab for this in MCS under View | Compile & Program Options.
Then, find the .inc file under the PBP folder that PBP used for your specific device, such as 16F628A.INC for the 628A you mentioned you might use.
Open this file in any text editor (notepad works!) and find the __config fine, and comment it with a semicolon (that's the comment character in assembly)
MPLAB makes a nice platform to set your config bits. Select the device you're using and find the config bits panel. You can see all the config choices, select them, and it gives you the proper names and valuses for the config settings.
In your .bas file, add the config settings. Here's how that looked for a recent F88 project of mine:
asm
__config _CONFIG1, 2f50h
__config _CONFIG2, 3ffch
endasm
2cents: When I'm trying to get a new PIC project up, I do the smallest steps first, things like set the osc frequency and have it come out on a pin so I can make sure I at keast have the clock I need.
The OSC statement does not set the oscillator, it just tells the compiler what freq you think you're running the osc at.
thanks for your help. did not find the line in my include file to rem out
tried adding your line got several errors about symble not defined did assemble
however it did not solve the problem any help would be appreicated
Using MPASM
Using PMCode:' ' PIC Configuration ' ================= @ __CONFIG _INTRC_OSC_NOCLKOUT & _MCLRE_OFF & _LVP_OFF & _WDT_OFF & _PWRTE_ON & _BODEN_ON ' ' Hardware configuration ' ====================== CMCON=7 ' disable internal comparator TRISA=0 ' Set all PORTA capable i/o to output TRISB=0 ' Set all PORTB i/o to output ' ' Hardware initialisation ' ======================= Pause 1000 ' 1 second for LCD initialisation ' ' Main loop ' ========= Start: LCDOUT $FE,1,"Should Work now!" Here: Goto here
Code:' ' PIC Configuration ' ================= @ DEVICE PIC16F628, INTRC_OSC_NOCLKOUT, WDT_OFF, PWRT_ON, MCLR_OFF, LVP_OFF, PROTECT_OFF ' ' Hardware configuration ' ====================== CMCON=7 ' disable internal comparator TRISA=0 ' Set all PORTA capable i/o to output TRISB=0 ' Set all PORTB i/o to output ' ' Hardware initialisation ' ======================= Pause 1000 ' 1 second for LCD initialisation ' ' Main loop ' ========= Start: LCDOUT $FE,1,"Should Work now!" Here: Goto here
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
problem seems to be the microstudio does not like the inc files that came with the pbp and this is the one i seem to need but get many errors works much better with the include files that came with mplab still doesnot give what i want but no errors. tried to unstall everthing and reinstall but no use
could reall use some help here??/
Bookmarks