@joan
Maybe i was misunderstood, i have no doubt on how the slave device works (see my first post), i simply cannot find a way to output that sequnce.
The device is a touch screen controller, but id don't think it's availible on the consumer market.
@BAStumm
That seem to be what i'm looking for... is there a way i can use that functions by command line or python script?
Thank you both, guys!
P.S:
So far I got it working using this (terrible

) GPIO bitbanging python script :
Code: Select all
import RPi.GPIO as GPIO
#####################
# SETUP #
#####################
#set up GPIO using BCM numbering
GPIO.setmode(GPIO.BCM)
# setup dataready GPIO
GPIO.setup(22, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(23, GPIO.IN, pull_up_down=GPIO.PUD_UP)
#####################
# FUNCTIONS #
#####################
def clk(value):
if (value):
GPIO.setup(22, GPIO.IN, pull_up_down=GPIO.PUD_UP)
else:
GPIO.setup(22, GPIO.OUT, pull_up_down=GPIO.PUD_UP)
GPIO.output( 22, False)
return
def data(value):
if (value):
GPIO.setup(23, GPIO.IN, pull_up_down=GPIO.PUD_UP)
else:
GPIO.setup(23, GPIO.OUT, pull_up_down=GPIO.PUD_UP)
GPIO.output( 23, False)
return
def datard():
return(GPIO.input(23) == 1)
def StartBus():
clk(True)
data(True)
data(False)
def StopBus():
clk(True)
data(False)
data(True)
def WriteByte(x):
#bit 0
clk(False)
data((x&128 != 0))
clk(True)
#bit 1
clk(False)
data((x&64 != 0))
clk(True)
#bit 2
clk(False)
data((x&32 != 0))
clk(True)
#bit 3
clk(False)
data((x&16 != 0))
clk(True)
#bit 4
clk(False)
data((x&8 != 0))
clk(True)
#bit 5
clk(False)
data((x&4 != 0))
clk(True)
#bit 6
clk(False)
data((x&2 != 0))
clk(True)
#bit 7
clk(False)
data((x&1 != 0))
clk(True)
#ack
clk(False)
data(True)
clk(True)
clk(False)
def ReadByte():
x=0
data(True);
#bit 0
clk(False)
clk(True)
if (datard()):
x=x+128
#bit 1
clk(False)
clk(True)
if (datard()):
x=x+64
#bit 2
clk(False)
clk(True)
if (datard()):
x=x+32
#bit 3
clk(False)
clk(True)
if (datard()):
x=x+16
#bit 4
clk(False)
clk(True)
if (datard()):
x=x+8
#bit 5
clk(False)
clk(True)
if (datard()):
x=x+4
#bit 6
clk(False)
clk(True)
if (datard()):
x=x+2
#bit 7
clk(False)
clk(True)
if (datard()):
x=x+1
#ack
clk(False)
data(False)
clk(True)
clk(False)
return x
#####################
# MAIN #
#####################
#StartBus()
#WriteByte(0xA1)
#b1=ReadByte()
#b2=ReadByte()
#StopBus()
#print("0x%02X" % b1)
#print("0x%02X" % b2)