Hello!

I am trying use a 16F628A with an LCD 2x16 hd44780 module.

(The contrast of LCD and backlite are ok ;) )

The 16F628A has not xtal. I use the internal oscilator.

My code start with

include 16f628a                       -- Micro a usar
pragma target OSC INTOSC_NOCLKOUT     -- Oscilador interno
pragma target clock 4_000_000         -- Frecuencia del oscilador
pragma target WDT  disabled           -- WDT off
pragma target LVP  disabled           -- no low voltage programming
pragma target MCLR internal           --


and continues with the i/o definitions:

enable_digital_io()                   -- Todos los pines como I/O digitales
const byte LCD_ROWS    =  2           -- LCD de dos lineas
const byte LCD_CHARS   =  16          -- y 16 caracteres por linea

var   bit  lcd_en        is  pin_A1   -- Pin E del LCD
var   bit  lcd_rs        is  pin_A0   -- Pin RS del LCD
var   byte lcd_dataport  is  portB_high  -- 4 data pins

pin_A0_direction       = output
pin_A1_direction       = output
portB_high_direction   = output


Obviusly, the LCD module are conected like the source code.

Then, the code is:


include lcd_hd44780_4                 -- Incluyo la libreria del LCD
lcd_init()                            -- e inicializo el controlador del LCD

include delay                         -- Incluyo la libreria de las demoras

delay_1ms(500)
lcd_clear_screen()
lcd_write_char ("A")
delay_1ms(500)

etc,etc,etc...


The "A" char never is shown. The LCD only show one line of squares, the same
if the 16F628A  will not exist.

The HEX file run fine in the simulator (PIC SIMULATOR IDE). But in the real
prototype the PIC micro appears not run. :(

i have some experience with PICs and BASIC / CCS, and i builded tens of
circuits without problems. But in this case, the mad micro dont run! :)

¿Some idea? ¿What can test?

Cheers!

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en.

Reply via email to