Hi,

I was struggling with an I2C LCD display until I found out on the 
manufacturer website that, due to a design flaw, the I²C bus speed should 
be 50 kHz 
(for the record: 
https://support.newhavendisplay.com/hc/en-us/community/posts/9600301114775-NHD-0220D3Z-NSW-BBW-V3-using-I2C-dropping-characters
 
)

My request here is to allow the user to define the sspadd value directly in 
his application by modifying the following code in i2c_hardware.jal

   -- set correct speed
   if    _i2c_bus_speed == 10 then sspadd = _i2c_1mhz
   elsif _i2c_bus_speed ==  4 then sspadd = _i2c_400khz
   elsif _i2c_bus_speed ==  1 then sspadd = _i2c_100khz
   elsif _i2c_bus_speed ==  0 then sspadd = _i2c_slowest
   else                            sspadd = _i2c_100khz      -- default
   end if

so that the user may override the default 100 kHz value: 
by defining _i2c_bus_speed = 0xFF and initialize sspadd with the needed 
value in his application

*   if _i2c_bus_speed != 0xFF then*
     -- set correct speed
       if    _i2c_bus_speed == 10 then sspadd = _i2c_1mhz
        elsif _i2c_bus_speed ==  4 then sspadd = _i2c_400khz
        elsif _i2c_bus_speed ==  1 then sspadd = _i2c_100khz
        elsif _i2c_bus_speed ==  0 then sspadd = _i2c_slowest
        else                            sspadd = _i2c_100khz      -- default
       end if

*   end if*

What do you think ?

Kind regards,

David

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/jallib/28c93aa1-8b14-4004-aa96-a4692f808654n%40googlegroups.com.

Reply via email to