Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
April 19, 2024, 07:49:47 19:49


Login with username, password and session length


Pages: [1]
Print
Author Topic: lcd on any port except portH (default)  (Read 4658 times)
0 Members and 1 Guest are viewing this topic.
meho
Newbie
*
Offline Offline

Posts: 18

Thank You
-Given: 1001
-Receive: 11


« on: April 03, 2008, 09:18:58 21:18 »

hi,
i am using devel.board Bigpic4 from ME, 18F8520,sjk 8.000 crystal,build type release,mikrobasic 6.0
here are the project settings : default


clock 10
HS enabled
WDT disabled
LVP disabled
Xinst disabled (not seen in the left panel)

program LCD_simpl_any_port

main:

CMCON = %00000111              ' analog.comparators off
ADCON1 = %00001111             ' all pins digital
MEMCON.EBDIS = 1                 ' disable ext.mem.bus
PSPCON.PSPMODE = 0
portb = 0                              'have tried all ports - ONLY portH works
trisb = 0                               'LCD output
lcd_init(portb)                        'or any other except H
lcd_cmd(LCD_CLEAR)
lcd_cmd(LCD_CURSOR_OFF)
lcd_out(1,1," row1 ")
lcd_out(2,1," row2 ")
end.

it doesnt matter if 4- or 8-bit (have tried lcd_config & lcd8_config)simply doesnt work.
according to 18f8520 datasheet i can use any port (with some exception - avoid portE,correct I/O settings,.... or am i wrong here ?
have succesfully programmed LEDS,BUTTONS on ALL ports,but here i am stuck on portH - the same happens with GLCD - works only PortH & J
so if it is impossible - i could live with it - but why ?
looking forward for (im)possible solutions... any help is appreciated

miha
Logged
margo
Junior Member
**
Offline Offline

Posts: 52

Thank You
-Given: 38
-Receive: 33


« Reply #1 on: April 03, 2008, 11:40:11 23:40 »

double check the that the port you cant use doesnt have a whole load of pull up/down resistors and/or other components attached, should work with any port, that bigpic4 has a lot going on thats not obvious but most can be switched off via the dip switches, have a look at the circuit diagram
Logged
meho
Newbie
*
Offline Offline

Posts: 18

Thank You
-Given: 1001
-Receive: 11


« Reply #2 on: April 04, 2008, 11:13:22 11:13 »

double check the that the port you cant use doesnt have a whole load of pull up/down resistors and/or other components attached, should work with any port, that bigpic4 has a lot going on thats not obvious but most can be switched off via the dip switches, have a look at the circuit diagram
hi margo,
thanks for reply - following program displays chars on LCD - only on portH !! - BUT  !?

program CHAR_DISP     
dim char as word
main:
  CMCON = CMCON or $07                 ' OFF comparators
  ADCON1 = %00001111
  MEMCON.EBDIS = 1                     ' disable external memory bus
  trisb = 0
  Lcd_Init(PORTb)                         '  LCD
  Lcd_Cmd(LCD_CLEAR)
  Lcd_Cmd(LCD_CURSOR_OFF)
  loop:
    for char = 33 to 125
      Lcd_Out(1, 1, "char =")
      LCD_chr(1,10,char)
      DELAY_ms(1000)
    next char
  GOTO loop
end.
*****************

if i use ANY other port,there are only black rectangles  on 1.row of LCD ,but i can see LED(!) activity on that port - different LEDs are going ON/OFF - so program runs.....

as you kindly suggested i tried  switches&jumpers on board with no success.
Logged
margo
Junior Member
**
Offline Offline

Posts: 52

Thank You
-Given: 38
-Receive: 33


« Reply #3 on: April 04, 2008, 02:07:37 14:07 »

my best guess is 1. as port h is also used for adc then check the adcon statement is correct,
2. you comment that the led's on the board flash it time to the data transfer...THEY SHOULD NOT..you need to disconnect them the pic i/o cant drive both the leds and the lcd display, I think there is a jumper that provides power to the led's either to VCC (sink) or to VSS (source) disconnect this ,,also look for the 8x dip switches that drive the leds and switch them to off...failing this ask mikroE via the forum
Logged
pickit2
Moderator
Hero Member
*****
Offline Offline

Posts: 4647

Thank You
-Given: 826
-Receive: 4207


There is no evidence that I muted SoNsIvRi


« Reply #4 on: April 04, 2008, 03:19:15 15:19 »

hi,
i am using devel.board Bigpic4 from ME, 18F8520,sjk 8.000 crystal,build type release,mikrobasic 6.0
here are the project settings : default
according to 18f8520 datasheet i can use any port (with some exception - avoid portE,correct I/O settings,.... or am i wrong here ?
have succesfully programmed LEDS,BUTTONS on ALL ports,but here i am stuck on portH - the same happens with GLCD - works only PortH & J
so if it is impossible - i could live with it - but why ?miha
Your board is prewired to port H so if you say in your program use port x, you need magic wires to rewire your lcd to the new port.
or you need to get your solering iron out and rewire your lcd to the port you want to use.

meho could you made an ios of your cd for the Bigpic4 board and post it in rapidshare.
Logged

Note: I stoped Muteing bad members OK I now put thier account in sleep mode
meho
Newbie
*
Offline Offline

Posts: 18

Thank You
-Given: 1001
-Receive: 11


« Reply #5 on: April 04, 2008, 07:43:34 19:43 »

Your board is prewired to port H so if you say in your program use port x, you need magic wires to rewire your lcd to the new port.
or you need to get your solering iron out and rewire your lcd to the port you want to use.

meho could you made an ios of your cd for the Bigpic4 board and post it in rapidshare.


huh...i see now (as ozzy from black sabbath sung about 35 years ago "my eyes are blind and i cant see" - simply overseen hard wiring - (dont blame me too much - am ozzy's contemporary)

but still..so there is no way to use both  ie. LCD and GLCD at the same time ? (except with LCD/GLCD add-on adapter connected to any port ? )

i'll be back with rapidshare link

Posted on: April 04, 2008, 08:35:45 20:35 - Automerged

my best guess is 1. as port h is also used for adc then check the adcon statement is correct,
2. you comment that the led's on the board flash it time to the data transfer...THEY SHOULD NOT..you need to disconnect them the pic i/o cant drive both the leds and the lcd display, I think there is a jumper that provides power to the led's either to VCC (sink) or to VSS (source) disconnect this ,,also look for the 8x dip switches that drive the leds and switch them to off...failing this ask mikroE via the forum

thanks for your help - pls see pickit2's reply- it's hard wired portH !!
Logged
margo
Junior Member
**
Offline Offline

Posts: 52

Thank You
-Given: 38
-Receive: 33


« Reply #6 on: April 05, 2008, 09:27:16 21:27 »

are you saying you have left the LCD in the default socket on the board and then thought you could drive it from any port just in software?Huh...what made you think that?HuhHuh??  I assumed you had an lcd physically connected to the correct port and then had problems accessing it...........

fcuk me,no wonder it didnt work
 erm.....no you can drive a lcd from a port you cant connect to/ no you cant drive a lcd and a graphics lcd that share the same port..yes you do need a 5V supply to make it work

ps thers nothing on the CD that can br DL'ed from the mikro site including a circuit diagram for the board+ all the examples

RTFM
« Last Edit: April 05, 2008, 09:30:52 21:30 by margo » Logged
pickit2
Moderator
Hero Member
*****
Offline Offline

Posts: 4647

Thank You
-Given: 826
-Receive: 4207


There is no evidence that I muted SoNsIvRi


« Reply #7 on: April 06, 2008, 12:08:14 12:08 »

ps thers nothing on the CD that can br DL'ed from the mikro site including a circuit diagram for the board+ all the examples

RTFM
And where of the site, is the download section for the software to drive the onboard programmer and interface software.? you only get this with the kit. and yes I RTFM see http://www.mikroe.com/en/tools/bigpic4/


Edit: if you want to wire LCD to an other port, ie. B..F all you need is a 10pin icd connecter, a 10Kpot, and a connecter for your LCD.
« Last Edit: April 06, 2008, 12:15:35 12:15 by pickit2 » Logged

Note: I stoped Muteing bad members OK I now put thier account in sleep mode
margo
Junior Member
**
Offline Offline

Posts: 52

Thank You
-Given: 38
-Receive: 33


« Reply #8 on: April 06, 2008, 05:29:21 17:29 »

And where of the site, is the download section for the software to drive the onboard programmer and interface software.? you only get this with the kit. and yes I RTFM see http://www.mikroe.com/en/tools/bigpic4/



onboard programmer software http://www.mikroe.com/en/download/ .........  programmer sw/examples/ manuals & diagrams
Logged
meho
Newbie
*
Offline Offline

Posts: 18

Thank You
-Given: 1001
-Receive: 11


« Reply #9 on: April 07, 2008, 12:51:17 12:51 »

Edit: if you want to wire LCD to an other port, ie. B..F all you need is a 10pin icd connecter, a 10Kpot, and a connecter for your LCD.
[/quote]

hi,pickit2
here are the links i promised to UL - be warned- they are pretty huge ! (>400mb)
thanks again for being patient and opening my (hard wired) =blinded - eyes
i need both displays so i'll connect lcd as you suggested

file1/5  http://mihd.net/tmev2g3
file 2/5 http://mihd.net/6uw20nt
file 3/5 http://mihd.net/94fmnea
file 4/5  http://mihd.net/9edgn3k
file 5/5  http://mihd.net/4vdrti1
Logged
pickit2
Moderator
Hero Member
*****
Offline Offline

Posts: 4647

Thank You
-Given: 826
-Receive: 4207


There is no evidence that I muted SoNsIvRi


« Reply #10 on: April 07, 2008, 03:14:29 15:14 »

meho
if you look at the port headers on your board
you can wire a lead to use any port
 see   http://www.myke.com/lcd.htm  on how to wire up
Logged

Note: I stoped Muteing bad members OK I now put thier account in sleep mode
meho
Newbie
*
Offline Offline

Posts: 18

Thank You
-Given: 1001
-Receive: 11


« Reply #11 on: April 07, 2008, 06:39:14 18:39 »

meho
if you look at the port headers on your board
you can wire a lead to use any port
 see   http://www.myke.com/lcd.htm  on how to wire up

once again - great thanks to you (and the others) to help me out - i was so deep in researching my new bigpic4 board - have tried so many options - and there are still so many to discover-that i simply overseen" : LEDS & switches are connected to ports A incl. F,...
but LCD,GLCD,DS1820,ADC,RS232 and MMC/CD card slot are wired to exclusive ports (no magic or wireless wires...) !!!

as someone advises, RTFM -if all other fails read the  manual ( better : AND ask nice people who know )


Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC