If it works with one PIC and not the other on the same board then it must be a code/config problem.
Post your code and config settings from the inc file if you are not setting them in code.
Then maybe we can help.
If it works with one PIC and not the other on the same board then it must be a code/config problem.
Post your code and config settings from the inc file if you are not setting them in code.
Then maybe we can help.
Dave
Always wear safety glasses while programming.
sorry this took a while to get back I have been busy lately
again any enlightenment would be great ,cause its got me beat .I should also mention its my first "project" with one of the newer pics with the internal clocks and what not,so it could be something quite obvious to you more experienced PIC'ers
thanksCode:INCLUDE "modedefs.bas" @ device pic16F677, intrc_osc_noclkout 'DEFINES ------------------------------ OSCCON = %01100101 'set internal clock at 4MHZ OSCTUNE = %00000 'OSCCON = %01101000 define OSC 4 'this makes no difference trisb = %00000000 trisc = %00000000 WPUB = %00000000 'weak pullups on portB disabled IOCB = %00000000 'interupt on change disabled SSPCON.5 = 0 'SSPEN CM1CON0 = %00000000 'comparaters disabled CM2CON0 = %00000000 ANSEL = %00000000 'ADON = 0 'no ADC inabled define LCD_DREG PORTB DEFINE LCD_DBIT 4 DEFINE LCD_RSREG PORTC DEFINE LCD_RSBIT 7 DEFINE LCD_EREG PORTC DEFINE LCD_EBIT 6 DEFINE LCD_BITS 4 define LCD_BITS 4 define LCD_LINES 1 define LCD_COMMANDUS 2000 define LCD_DATAUS 50 temp var byte 'start------------------------------------- pause 500 temp = 104 lcdout $FE,$0E 'this works pause 1500 lcdout $FE,$14 'this works pause 1500 lcdout $FE,$80 'this works pause 1500 Loop: lcdout $FE,1 pause 700 lcdout $FE,1,"one" 'this doesnt work pause 700 lcdout $FE,1 pause 700 lcdout $FE,2,"two" 'this doesnt work pause 700 lcdout $FE,1 pause 700 LCDOUt $FE,#temp 'this doesnt work pause 700 goto loop end
Shot in the dark:
ANSELH = 0
and take out the extra define LCD_BITS 4
Last edited by Archangel; - 3rd February 2010 at 07:52.
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
wow I dont know how many times Ive looked through that code and never spotted I had that define twice, but that didnt work ,But clearing ANSELH did thanks so much ,I have no idea why that works though but its sure good to see text on that screen
thanks joe
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
thanks joe ,Ive been through that data sheet over and over ,looking to turn off all the hardware stuff,completely missed that though. any ideas why the control commands worked,surely they would need the same data pins ,or have I missed something in the screens data sheet too....
thanks again
I am not sure which "control commands" you refer to . . . But some PBP statements do a whole lot of stuff behind the scenes. For instance the High / Low commands set tris registers on the fly and may well kill off some analog functions as well, I won't swear by that though.
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Bookmarks