Searching \ for '[pic]: LCD mystery' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/io/lcd/pic.htm?key=lcd
Search entire site for: 'LCD mystery'.

Exact match. Not showing close matches.
PICList Thread
'[pic]: LCD mystery'
2001\04\12@161127 by Jesse LaBonte

flavicon
face
Have you checked for an inadvertant Solder Connection between two of the
pins, this would
exhibit the qualities you have described, as the command codes may or may
not work, but the
character codes would probably never be correct.    I'm not questioning
your solder skills, I just
know that it has happened to me a few dozen times.

T HNX Jesse.

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\04\12@164325 by Drew Vassallo

picon face
>I saw something right after the label SendPSTRLoop:.   You have a CALL MSG
>line there, but MSG is only defined as a variable.  When I ran your code in

I saw this as well... You load the variable "MSG" with HelloWorld as a
pointer to the start of the message table (movlw HelloWorld, movwf MSG), but
when you use "call MSG," you will always call the memory address of MSG as a
literal (i.e., if MSG is defined as memory address 0x23, for example, you
will be jumping to the code at program memory address 0x23, always.)

You can't do this :)

Moreover, you actually have "addwf PCL, F" at the first line of your message
table, which is correct if you load W with the incremental value for the
proper character.  What you want to do is just load W with a number (0 ->
whatever) representing the character you want to retrieve (0=H, 1=e, 2=l,
3=l, etc.) and call the "HelloWorld" table.

--Andrew
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\04\12@200937 by Jose S. Samonte Jr.

picon face
I'm also a beginner in PIC programming but shouldn't this be

Start:
       bsf     STATUS,RP0
       clrf    PORTB       <= clrf TRISB
       bcf     STATUS,RP0
       clrf    PORTB


Drew Vassallo <spam_OUTsnurpleTakeThisOuTspamHOTMAIL.COM> wrote:
>I saw something right after the label SendPSTRLoop:.   You have a CALL MSG
>line there, but MSG is only defined as a variable.  When I ran your code in

I saw this as well... You load the variable "MSG" with HelloWorld as a
pointer to the start of the message table (movlw HelloWorld, movwf MSG), but
when you use "call MSG," you will always call the memory address of MSG as a
literal (i.e., if MSG is defined as memory address 0x23, for example, you
will be jumping to the code at program memory address 0x23, always.)

You can't do this :)

Moreover, you actually have "addwf PCL, F" at the first line of your message
table, which is correct if you load W with the incremental value for the
proper character.  What you want to do is just load W with a number (0 ->
whatever) representing the character you want to retrieve (0=H, 1=e, 2=l,
3=l, etc.) and call the "HelloWorld" table.

--Andrew
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads



____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\04\12@233131 by Drew Vassallo

picon face
>I'm also a beginner in PIC programming but shouldn't this be
>
>Start:
>         bsf     STATUS,RP0
>         clrf    PORTB       <= clrf TRISB
>         bcf     STATUS,RP0
>         clrf    PORTB

Technically, it works as he has it written.  For correctness, it probably
should be changed to TRISB, but since it wasn't part of his main problem, I
didn't mention it in my email.  There are also a number of other parts of
the code that could be cleaned up, but those didn't have anything to do with
the problem he mentioned, either.

Once he's fixed the problem, he can go back and clean up the code if he
needs to, but it's not necessary at this point.

Then again, people might disagree and say that you should start out learning
the right way by selecting the proper commands in the code, but he wasn't
asking about that... just how to get the correct characters on the LCD.

--Andrew
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\04\13@010850 by Jose S. Samonte Jr.

picon face
OK sir Andrew! =)


Drew Vassallo <.....snurpleKILLspamspam@spam@HOTMAIL.COM> wrote:
>I'm also a beginner in PIC programming but shouldn't this be
>
>Start:
>         bsf     STATUS,RP0
>         clrf    PORTB       <= clrf TRISB
>         bcf     STATUS,RP0
>         clrf    PORTB

Technically, it works as he has it written.  For correctness, it probably
should be changed to TRISB, but since it wasn't part of his main problem, I
didn't mention it in my email.  There are also a number of other parts of
the code that could be cleaned up, but those didn't have anything to do with
the problem he mentioned, either.

Once he's fixed the problem, he can go back and clean up the code if he
needs to, but it's not necessary at this point.

Then again, people might disagree and say that you should start out learning
the right way by selecting the proper commands in the code, but he wasn't
asking about that... just how to get the correct characters on the LCD.

--Andrew
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads



____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\04\17@125116 by Michael Rigby-Jones

flavicon
face
{Quote hidden}

Agreed. This can be overcome by explicity setting any data latches before
switching from input to output, or even better using a shadow register.

> 2 - Inputs are latched at the beginning of a cycle and output are latched
> at
> the end of the cycle.  You therefore can't write a bit value one cycle,
> then
> read a different bit that the external circuit was supposed to drive in
> response on the next cycle.  In that case you need to insert one NOP for
> each instruction time you want the external circuit to have before reading
> its response.
>
>
However, a BCF/BSF reads the inputs at the beginning of the cycle.  Thus
successive BSFs/BCFs on the same port's data latches is a questionable
activity at the best of times.  Granted it usually works at low clock
frequencies and with low loadings on the pin, but I have personaly been
bitten with this problem running at 4MHz, the pin was driving the gate of a
power MOSFET.  At 20MHz, it dosen't work very often at all.

Regards

Mike

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\04\17@180836 by Olin Lathrop

face picon face
> However, a BCF/BSF reads the inputs at the beginning of the cycle.  Thus
> successive BSFs/BCFs on the same port's data latches is a questionable
> activity at the best of times.  Granted it usually works at low clock
> frequencies and with low loadings on the pin, but I have personaly been
> bitten with this problem running at 4MHz, the pin was driving the gate of
a
> power MOSFET.  At 20MHz, it dosen't work very often at all.

This is an issue if doing a BSF/BCF to different bits of the same port on
successive instructions.  It should still work fine if done on the same bit.
The second instruction could possibly read the wrong value for that bit, but
that will be overriddend by the operation itself.


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, EraseMEolinspam_OUTspamTakeThisOuTembedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\04\18@032636 by Michael Rigby-Jones

flavicon
face
{Quote hidden}

Agreed, consecutive operations on the same pin should at least leave the pin
in a predictable state after the last instruction.  Whether or not a valid
pulse is generated by this would depend very much on clock speed and
capacitive loading etc.  And you would still have the problem of the data
latches on other tri-stated pins being modifed.

I guess the bottom line is that as long as the software/hardware guys are
aware of the above and code/design within the limits there shouldn't be a
problem with consecutive bit operations ON THE SAME PIN.

I believe this issue has been resolved on the 18C series which can read back
the data latches rather than the pin state?

Mike

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


More... (looser matching)
- Last day of these posts
- In 2001 , 2002 only
- Today
- New search...