I got the mechanics/math for my inclinometer working earlier in the week and have temperature, tilt, and re-zero working in simulation.
Today I turned to my graphic display. It is a New Haven Display, NHD-12864MZ and uses the KS0108 controller. The PIC's I have available are the 16F690 and 16F1829. Both are just 20-pin devices.
It appears most people use a single port to drive the display data pins DB0-DB7. I have assigned PortC to that. Six pins are needed for control functions, but I do not have 6 pins on the same port for doing that.
Plan:
1) PortA pins RA0,RA1, RA2, and RA5 will control chip select (right/left halves of LCD, 2 pins), register select, and enable.
2) PortB pins RB4 and RB6 will control reset and read/write select.
3) PortB will be set before setting PortA. PortC (data) will be set last.
Does that plan make sense? Would you divide the control pins differently?
Note: USART uses pins RB5 and RB7, MCLR is RA3, and clock out is RA4. The datasheet is pretty skimpy.
Thanks,
John
Today I turned to my graphic display. It is a New Haven Display, NHD-12864MZ and uses the KS0108 controller. The PIC's I have available are the 16F690 and 16F1829. Both are just 20-pin devices.
It appears most people use a single port to drive the display data pins DB0-DB7. I have assigned PortC to that. Six pins are needed for control functions, but I do not have 6 pins on the same port for doing that.
Plan:
1) PortA pins RA0,RA1, RA2, and RA5 will control chip select (right/left halves of LCD, 2 pins), register select, and enable.
2) PortB pins RB4 and RB6 will control reset and read/write select.
3) PortB will be set before setting PortA. PortC (data) will be set last.
Does that plan make sense? Would you divide the control pins differently?
Note: USART uses pins RB5 and RB7, MCLR is RA3, and clock out is RA4. The datasheet is pretty skimpy.
Thanks,
John