PDA

View Full Version : 16F88 with LCD, UART use and all ADC's possible ?



RFsolution
- 17th January 2012, 21:28
Hi all

I was wondering if it will be possible to use the following pin configuration

RB0-RB3 as LCD D4-D7
RA6,RA7 as E,RS

RA0-RA4 (AN0-AN4) as 10bit ADC
RB6,RB7 (AN5,AN6) as 10bit ADC

And use the UART as a RS485 driver

RB2 as RX (already in use for the LCD)
RB5 as TX (already in use for the LCD)

RB0,RB1,RB3 or RB4 as TX/RX for the SP485 line driver


Thanks

retepsnikrep
- 18th January 2012, 03:39
The question is not really clear, if you are using the uart pins on the pic for your rs485 then you can't really use them for the lcd.

If you are hoping to double up on the pin function and use RB2 as the rx you might get away with it as long as data is only arriving when the lcd is not updating and vice versa.

RB5 is not allocated in your post to the lcd?

Why not just use a 16F886

Be very careful with the MCLR on the 16F88 in the configs, if you disable it to use the pin as an I/O you won't be able to program it again via ICSP without great difficulty. It has a hardware gotcha which is a total pain. I always leave it enabled and pulled high with a 10K and dedicated to the ICSP function. Try it if you want ;(

The 16F886 does not have this problem.

RFsolution
- 18th January 2012, 08:01
Hi

Well you are right,

is it possible to use LCDOUT in a way that D4-D7 of the LCD or not 4 I/O ports in a row

as I need all the ADC's portA is not an option

unfortunatly RX and TX from the uart on port B are in lower and higher part of portb

Thanks



The question is not really clear, if you are using the uart pins on the pic for your rs485 then you can't really use them for the lcd.

If you are hoping to double up on the pin function and use RB2 as the rx you might get away with it as long as data is only arriving when the lcd is not updating and vice versa.

RB5 is not allocated in your post to the lcd?

Why not just use a 16F886

Be very careful with the MCLR on the 16F88 in the configs, if you disable it to use the pin as an I/O you won't be able to program it again via ICSP without great difficulty. It has a hardware gotcha which is a total pain. I always leave it enabled and pulled high with a 10K and dedicated to the ICSP function. Try it if you want ;(

The 16F886 does not have this problem.

Jumper
- 18th January 2012, 14:33
Do a search for LCD_ANYPIN and I am sure you might find a DT solution to your problem

http://www.picbasic.co.uk/forum/showthread.php?t=7038&highlight=LCD_AnyPin