Searching \ for '[PIC] AD Conv and LCD conflict?' 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: 'AD Conv and LCD conflict?'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] AD Conv and LCD conflict?'
2005\10\18@170426 by drew

flavicon
face
On all of the pics I've looked at nearly all the a/d conversion input
pins are multiplexed on lcd display output pins.

Can they conflict?  I'd be surprised if the couldn't.

If I want to do both what do I have to separate them.

Want to be able to do a/d on a bunch of sensors, and interface with
a lcd/keypad, and other stuff.

Hmm, being able to do a/d on the lcd outputs could ease troubleshooting.

Thanks,

2005\10\18@171842 by Jan-Erik Soderholm

face picon face
drew@technteach.com wrote :

> On all of the pics I've looked at nearly all the a/d conversion
> input pins are multiplexed on lcd display output pins.

What PICs and what "lcd display output pins" ??

Are you talking about the (rather few) PICs with
direct LCD drive ?

Jan-Erik.



2005\10\18@173927 by drew

flavicon
face
> What PICs and what "lcd display output pins" ??
>
> Are you talking about the (rather few) PICs with
> direct LCD drive ?

Yes I was looking at the pic16f91x mostly.
Thougt that was the way to do a bunch of a/d
and lcd.  Is there a better way?

2005\10\18@174758 by Jan-Erik Soderholm

face picon face
drew@technteach.com wrote :

> Yes I was looking at the pic16f91x mostly.

OK, that explains it... :-)

> Thougt that was the way to do a bunch of a/d
> and lcd.  Is there a better way?

Aren't those PICs for direct-drive controller-less
LCD modules (for high volume products maybe ?) ?
Or maybe I've missunderstod the use of those PICs.

Maybe use a standard HD44780 LCD ?
(And a "standard" PIC...)

Jan-Erik.



2005\10\18@181325 by Mike Harrison
flavicon
face
On Tue, 18 Oct 2005 23:47:57 +0200 (MEST), you wrote:

>spam_OUTdrewTakeThisOuTspamtechnteach.com wrote :
>
>> Yes I was looking at the pic16f91x mostly.
>
>OK, that explains it... :-)
>
>> Thougt that was the way to do a bunch of a/d
>> and lcd.  Is there a better way?
>
>Aren't those PICs for direct-drive controller-less
>LCD modules (for high volume products maybe ?) ?
>Or maybe I've missunderstod the use of those PICs.

Non-module is not necessarily limited to  high-volume apps.
There are plenty of segment LCDs available off-the-shelf, and custom LCD can easily be viable in
volumes in the low hundreds, particularly for small displays.

16F91x is an excellent way to do a/d + LCD apps if the segment count is right - price is pretty low,
and the LCD controller is more flexible than earlier Microchip LCD parts.


2005\10\18@194532 by Mauricio Jancic

flavicon
face
Yes, I'm trying to do the same. The 16F913 is the one I was going to use. It
is designed to handle 60 pixels so I figure "I'll limit my LCD to 60 pixels
and I'll be fine" I just need 2 A/D and 1 or 2 pushbuttons. Then I look at
the datasheet more close and saw that if I use all the 60 pixels of the '913
I only have left 3 pins and not all are input AND output (MCLR, OSC1 and
OSC2)....

So, whats up with that? I need to use a 2.5V reference and I might not be
very good in my memory but I think the Vref+ input is muxed to the COM3 for
the LCD.... Damm....

Is there a simple way to drive an LCD easyly and cheap?

I would love to have (desired)

- LCD (83 pixels, but can live with 60 or so)
- 3 A/D (can live with 2...)
- 2 or 3 digital inputs
- 1 digital output

Any suggestions?

Regards,
Mauricio Jancic
Janso Desarrollos - Microchip Consultants Program Member
.....infoKILLspamspam@spam@janso.com.ar
http://www.janso.com.ar
(54) 11 - 4542 - 3519

2005\10\18@213353 by Regulus Berdin

picon face
part 0 44 bytes
his is a multi-part message in MIME format.
part 1 621 bytes content-type:text/plain; charset=ISO-8859-1; format=flowed (decoded 7bit)

Mauricio Jancic wrote:
> Is there a simple way to drive an LCD easyly and cheap?
> Any suggestions?
>
I made one using multiple shift registers (74HC595) in series to drive
LCD.  It is only 1/2 bias by using 2 outputs of the shift register with
100K series to each COM/Backplane.  Setting one to 1 and other to 0
generates the half VCC.  The rest are the segments.  1/3 bias though is
a bit difficult but can be done using 3 outputs and series resistors for
each segment.

Attached is the lcd drive routine for 1/2 bias, 1/3 drive and 80
segments LCD.

regards,
Reggie


part 2 7293 bytes content-type:text/plain;
(decoded 7bit)

/*************************************************************
* 7 segment LCD routines using shift register 74HC595
* by Regulus Berdin
*
* LCD is 80 segments 1/3 drive and 1/2 bias.
*
* 3 COM/Backline are driven by the last 6 lines of the series
* shift registers.  2 outputs per backplane with 100K series
* resistor.
*
* lcd7_init() is called to initiale.
* lcd7_task() is the state machine. Should called at fixed
*             interval (1/x of LCD refresh rate).
*************************************************************/

const unsigned char digitmap[16] = {
/*
               faaab
               f        b
               f        b
               egggg
               e        c
               e        c
               ddddc

*/

/*          .abcdefg        */
       0b01111110,                /* 0 */
       0b00110000,                /* 1 */
       0b01101101,                /* 2 */
       0b01111001,                /* 3 */
       0b00110011,                /* 4 */
       0b01011011,                /* 5 */
       0b01011111,                /* 6 */
       0b01110000,                /* 7 */
       0b01111111,                /* 8 */
       0b01111011,                /* 9 */

       0b01110111,                /* A */
       0b01100111,                /* P */
       0b01111111,                /*  */
       0b01111111,                /*  */
       0b01111111,                /*  */
       0b00000000                /*blank */
};


unsigned char dbuf[10];
unsigned char dptr;
unsigned char pstate;

//define clock states
enum {
       COM1_HI, COM1_LO,
       COM2_HI, COM2_LO,
       COM3_HI, COM3_LO
};

//pin definitions
#define CLK                RA2
#define DATA        RA1
#define        LATCH        RA0

/*                                  .abcdefg        */
#define MASK_P        0b10000000
#define MASK_A        0b01000000
#define MASK_B        0b00100000
#define MASK_C        0b00010000
#define MASK_D        0b00001000
#define MASK_E        0b00000100
#define MASK_F        0b00000010
#define MASK_G        0b00000001

#define SET_MASK0(n, mask)                \
       DATA=1;                                                \
       if (dbuf[(n)] & (mask)) {        \
               DATA=0;                                        \
       }                                                        \
       serclk()

#define SET_MASK1(n, mask)                \
       DATA=0;                                                \
       if (dbuf[(n)] & (mask)) {        \
               DATA=1;                                        \
       }                                                        \
       serclk()

#define SET_DATA(n)        (DATA=(n), serclk())
#define serclk() (CLK=0,CLK=1)


void lcd7_init()
{
       unsigned char i;
       for (i=0;i<10;++i) {
               CLRWDT();
               dbuf[i]=digitmap[i];
       }
       dptr=0;
       pstate=0;
}

void set_digit(unsigned char i, unsigned char v)
{
       dbuf[i]=digitmap[v];
}

void lcd7_task()
{
       LATCH=0;
//        asm("nop");
       LATCH=1;

       switch (pstate) {
               case COM1_HI:

                       //COM3 - half vcc
                       SET_DATA(0);
                       SET_DATA(1);
               
                       //COM2 - half vcc
                       SET_DATA(0);
                       SET_DATA(1);

                       //COM1 - 1
                       SET_DATA(1);
                       serclk();

                       //DIGIT8
                       serclk();
                       SET_MASK0(7, MASK_A);
                       SET_MASK0(7, MASK_F);

                       //DIGIT7
                       SET_DATA(1);
                       SET_MASK0(6, MASK_A);
                       SET_MASK0(6, MASK_F);

                       //DIGIT6
                       SET_DATA(1);
                       SET_MASK0(5, MASK_A);
                       SET_MASK0(5, MASK_F);

                       //DIGIT5
                       SET_DATA(1);
                       SET_MASK0(4, MASK_A);
                       SET_MASK0(4, MASK_F);

                       //DIGIT4
                       SET_DATA(1);
                       SET_MASK0(3, MASK_A);
                       SET_MASK0(3, MASK_F);

                       //DIGIT3
                       SET_DATA(1);
                       SET_MASK0(2, MASK_A);
                       SET_MASK0(2, MASK_F);

                       //DIGIT2
                       SET_DATA(1);
                       SET_MASK0(1, MASK_A);
                       SET_MASK0(1, MASK_F);

                       //DIGIT1
                       SET_DATA(1);
                       SET_MASK0(0, MASK_A);
                       SET_MASK0(0, MASK_F);
                       break;

               case COM1_LO:

                       //COM3 - half vcc
                       SET_DATA(0);
                       SET_DATA(1);
               
                       //COM2 - half vcc
                       SET_DATA(0);
                       SET_DATA(1);

                       //COM1 - 0
                       SET_DATA(0);
                       serclk();

                       //DIGIT8
                       serclk();
                       SET_MASK1(7, MASK_A);
                       SET_MASK1(7, MASK_F);

                       //DIGIT7
                       SET_DATA(0);
                       SET_MASK1(6, MASK_A);
                       SET_MASK1(6, MASK_F);

                       //DIGIT6
                       SET_DATA(0);
                       SET_MASK1(5, MASK_A);
                       SET_MASK1(5, MASK_F);

                       //DIGIT5
                       SET_DATA(0);
                       SET_MASK1(4, MASK_A);
                       SET_MASK1(4, MASK_F);

                       //DIGIT4
                       SET_DATA(0);
                       SET_MASK1(3, MASK_A);
                       SET_MASK1(3, MASK_F);

                       //DIGIT3
                       SET_DATA(0);
                       SET_MASK1(2, MASK_A);
                       SET_MASK1(2, MASK_F);

                       //DIGIT2
                       SET_DATA(0);
                       SET_MASK1(1, MASK_A);
                       SET_MASK1(1, MASK_F);

                       //DIGIT1
                       SET_DATA(0);
                       SET_MASK1(0, MASK_A);
                       SET_MASK1(0, MASK_F);
                       break;

               case COM2_HI:

                       //COM3 - half vcc
                       SET_DATA(0);
                       SET_DATA(1);
               
                       //COM2 - 1
                       SET_DATA(1);
                       serclk();

                       //COM1 - half vcc
                       SET_DATA(0);
                       SET_DATA(1);

                       //DIGIT8
                       SET_MASK0(7, MASK_B);
                       SET_MASK0(7, MASK_G);
                       SET_MASK0(7, MASK_E);

                       //DIGIT7
                       SET_MASK0(6, MASK_B);
                       SET_MASK0(6, MASK_G);
                       SET_MASK0(6, MASK_E);

                       //DIGIT6
                       SET_MASK0(5, MASK_B);
                       SET_MASK0(5, MASK_G);
                       SET_MASK0(5, MASK_E);

                       //DIGIT5
                       SET_MASK0(4, MASK_B);
                       SET_MASK0(4, MASK_G);
                       SET_MASK0(4, MASK_E);

                       //DIGIT4
                       SET_MASK0(3, MASK_B);
                       SET_MASK0(3, MASK_G);
                       SET_MASK0(3, MASK_E);

                       //DIGIT3
                       SET_MASK0(2, MASK_B);
                       SET_MASK0(2, MASK_G);
                       SET_MASK0(2, MASK_E);

                       //DIGIT2
                       SET_MASK0(1, MASK_B);
                       SET_MASK0(1, MASK_G);
                       SET_MASK0(1, MASK_E);

                       //DIGIT1
                       SET_MASK0(0, MASK_B);
                       SET_MASK0(0, MASK_G);
                       SET_MASK0(0, MASK_E);
                       break;

               case COM2_LO:
                       //COM3 - half vcc
                       SET_DATA(0);
                       SET_DATA(1);
               
                       //COM2 - 0
                       SET_DATA(0);
                       serclk();

                       //COM1 - half vcc
                       SET_DATA(0);
                       SET_DATA(1);

                       //DIGIT8
                       SET_MASK1(7, MASK_B);
                       SET_MASK1(7, MASK_G);
                       SET_MASK1(7, MASK_E);

                       //DIGIT7
                       SET_MASK1(6, MASK_B);
                       SET_MASK1(6, MASK_G);
                       SET_MASK1(6, MASK_E);

                       //DIGIT6
                       SET_MASK1(5, MASK_B);
                       SET_MASK1(5, MASK_G);
                       SET_MASK1(5, MASK_E);

                       //DIGIT5
                       SET_MASK1(4, MASK_B);
                       SET_MASK1(4, MASK_G);
                       SET_MASK1(4, MASK_E);

                       //DIGIT4
                       SET_MASK1(3, MASK_B);
                       SET_MASK1(3, MASK_G);
                       SET_MASK1(3, MASK_E);

                       //DIGIT3
                       SET_MASK1(2, MASK_B);
                       SET_MASK1(2, MASK_G);
                       SET_MASK1(2, MASK_E);

                       //DIGIT2
                       SET_MASK1(1, MASK_B);
                       SET_MASK1(1, MASK_G);
                       SET_MASK1(1, MASK_E);

                       //DIGIT1
                       SET_MASK1(0, MASK_B);
                       SET_MASK1(0, MASK_G);
                       SET_MASK1(0, MASK_E);
                       break;

               case COM3_HI:

                       //COM3 - 1
                       SET_DATA(1);
                       serclk();
               
                       //COM2 - half vcc
                       SET_DATA(0);
                       SET_DATA(1);

                       //COM1 - half vcc
                       SET_DATA(0);
                       SET_DATA(1);

                       //DIGIT8
                       SET_MASK0(7, MASK_P);
                       SET_MASK0(7, MASK_C);
                       SET_MASK0(7, MASK_D);

                       //DIGIT7
                       SET_MASK0(6, MASK_P);
                       SET_MASK0(6, MASK_C);
                       SET_MASK0(6, MASK_D);

                       //DIGIT6
                       SET_MASK0(5, MASK_P);
                       SET_MASK0(5, MASK_C);
                       SET_MASK0(5, MASK_D);

                       //DIGIT5
                       SET_MASK0(4, MASK_P);
                       SET_MASK0(4, MASK_C);
                       SET_MASK0(4, MASK_D);

                       //DIGIT4
                       SET_MASK0(3, MASK_P);
                       SET_MASK0(3, MASK_C);
                       SET_MASK0(3, MASK_D);

                       //DIGIT3
                       SET_MASK0(2, MASK_P);
                       SET_MASK0(2, MASK_C);
                       SET_MASK0(2, MASK_D);

                       //DIGIT2
                       SET_MASK0(1, MASK_P);
                       SET_MASK0(1, MASK_C);
                       SET_MASK0(1, MASK_D);

                       //DIGIT1
                       SET_MASK0(0, MASK_P);
                       SET_MASK0(0, MASK_C);
                       SET_MASK0(0, MASK_D);
                       break;

               case COM3_LO:

                       //COM3 - 0
                       SET_DATA(0);
                       serclk();
               
                       //COM2 - half vcc
                       SET_DATA(0);
                       SET_DATA(1);

                       //COM1 - half vcc
                       SET_DATA(0);
                       SET_DATA(1);

                       //DIGIT8
                       SET_MASK1(7, MASK_P);
                       SET_MASK1(7, MASK_C);
                       SET_MASK1(7, MASK_D);

                       //DIGIT7
                       SET_MASK1(6, MASK_P);
                       SET_MASK1(6, MASK_C);
                       SET_MASK1(6, MASK_D);

                       //DIGIT6
                       SET_MASK1(5, MASK_P);
                       SET_MASK1(5, MASK_C);
                       SET_MASK1(5, MASK_D);

                       //DIGIT5
                       SET_MASK1(4, MASK_P);
                       SET_MASK1(4, MASK_C);
                       SET_MASK1(4, MASK_D);

                       //DIGIT4
                       SET_MASK1(3, MASK_P);
                       SET_MASK1(3, MASK_C);
                       SET_MASK1(3, MASK_D);

                       //DIGIT3
                       SET_MASK1(2, MASK_P);
                       SET_MASK1(2, MASK_C);
                       SET_MASK1(2, MASK_D);

                       //DIGIT2
                       SET_MASK1(1, MASK_P);
                       SET_MASK1(1, MASK_C);
                       SET_MASK1(1, MASK_D);

                       //DIGIT1
                       SET_MASK1(0, MASK_P);
                       SET_MASK1(0, MASK_C);
                       SET_MASK1(0, MASK_D);

                       pstate=-1;                        
                       break;
       }

       ++pstate;
}


part 3 35 bytes content-type:text/plain; charset="us-ascii"
(decoded 7bit)

2005\10\19@041042 by Mike Harrison

flavicon
face
On Tue, 18 Oct 2005 20:39:58 -0300, you wrote:

>Yes, I'm trying to do the same. The 16F913 is the one I was going to use. It
>is designed to handle 60 pixels so I figure "I'll limit my LCD to 60 pixels
>and I'll be fine" I just need 2 A/D and 1 or 2 pushbuttons. Then I look at
>the datasheet more close and saw that if I use all the 60 pixels of the '913
>I only have left 3 pins and not all are input AND output (MCLR, OSC1 and
>OSC2)....
>
>So, whats up with that? I need to use a 2.5V reference and I might not be
>very good in my memory but I think the Vref+ input is muxed to the COM3 for
>the LCD.... Damm....
>
>Is there a simple way to drive an LCD easyly and cheap?

Direct-drive LCDs can be driven easily in software, but 60segs + is too many for sensible direct
drive.

>I would love to have (desired)
>
>- LCD (83 pixels, but can live with 60 or so)
>- 3 A/D (can live with 2...)
>- 2 or 3 digital inputs
>- 1 digital output

Yes - PIC16F914 will do all of that

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