--
-- file      : max232p.jal
-- author    : 
-- date      : 21-may-2001
-- purpose   : hd44780  IO pins, serial IO pins
-- requires  : -
-- pins      : see table
-- used by   : hd447804.jal, serial.jal
-- IMPORTANT : hd44780p  includes must be removed from hd447804.lib

-- GNU bla-bla is here 

-- pin assignment for the 4-bit + enable (7 PIC I/O pins) interface:
--
-- PIC        HD44780        
-- --------------------------
--  5 Gnd      1 Gnd         
-- 14 Vcc      2 Vcc         
--             3 Contrast, depends on LCD specifications (-2.5 to +2.5V)
--  6 B0      11 D4          
--  7 B1      12 D5          
--  8 B2      13 D6         
--  9 B3      14 D7         
-- 10 B4       4 RS D/I_    
--  5 B5       5 R/W_        
-- 11 B7       6 E     
     
--  PIC         serial
-- ----------------------
--  18 A1       serial input
--  17 A0       serial output


var volatile bit tx is pin_a0
pin_a0_direction = output
var volatile bit rx is pin_a1
pin_a1_direction = input


 var volatile bit  hd44780_4_DI is pin_b4
 var volatile bit  hd44780_4_E  is pin_b7
 var volatile bit  hd44780_4_RW is pin_b5
 var volatile byte hd44780_4_D  is port_b_low

 procedure _hd44780_4_init is
   port_b_low            = 0
   pin_b4                = low
   pin_b5                = low
   pin_b7                = low
   port_b_low_direction  = all_output
   pin_b4_direction      = output
   pin_b5_direction      = output
   pin_b7_direction      = output
 end procedure

    Source: geocities.com/vsurducan/electro/PIC

               ( geocities.com/vsurducan/electro)                   ( geocities.com/vsurducan)