hello

I try to use a display: DOG-m 183 (4bits, 1line, 8char) with a 18f452.
and the library by Richard Zengerink:"lcd_dog_m4"

My problem is : when transferring datas to the display, only first high 
nibble is correctly transmitted, the second nibble is always 1111.

here is my procedures:

var byte lcd_dataport is PORTA_low   --only the low port connected a0,  a1, 
a2  a3
var bit lcd_en is pin_a5   
--E                                                          d4, d5 ,d6, d7
var bit lcd_rs is pin_a4    --RS
PORTA_direction=all_output
pin_a4_direction=output
pin_a5_direction=output


procedure lcd_w(byte in value) is
--pragma inline
   lcd_dataport = (value>>4)
   lcd_en=high     --lcd E for data
   asm nop          --400ns with 10MHz xtal
   lcd_en=low

 lcd_dataport= value
 
   lcd_en=high
   asm nop
   lcd_en=low

end procedure

--                           and the init sequence
procedure lcd_init is
    delay_1ms(50)
      LCD_wi(0b_0010_0000)     --function   :4bit 1 line , is1
      LCD_wi(0b_0010_0001)     --function   :is1
      LCD_wi(0b_0001_0100)     --bias       : 1/4
      LCD_wi(0b_0111_0000)     --contrast
      LCD_wi(0b_0101_1110)     --pwr control
      LCD_wi(0b_0110_1010)     --follower
      LCD_wi(0b_0011_1000)     --function
      LCD_wi(0b_0000_1000)     --display   :display on/ cursor off
      LCD_wi(0b_0000_0001)     --clr display , cursor at home
      LCD_wi(0b_0000_0110)     --entry mode set : cursor moves ->

        delay_10us(4)
end procedure:

When I try to send a char data to the display, the first HIGH nibble is 
read, the second LOW is read as 1111

I don't understand where is the bug.
If someone experienced the same probleme........
Thanks in advance
Phil

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/jallib.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to