How Can I inject data into this chip? - Page 1
Forum section: electronics / beginners

author: Logan
author_rank: Frequent Contributor
timestamp: February 14, 2022, 03:44:13 pm
content: Hi friends.The chip in question is this one:https://www.mouser.com/datasheet/2/302/nxp_tda8784-326628.pdfI want to input some 13-bit data into serial pins 20-21-22, the required form is shown on page 12.Is it possible to do that without de-solder those pins, while the original host controller is powered on but idle?What's the simplest way to generate such signal?Thanks.

author: Renate
author_rank: Super Contributor
timestamp: February 14, 2022, 06:27:26 pm
content: Define "idle".If the controller has 3 state outputs that are disabled, sure you can send in a signal.If not, you're fighting a logic output.It's not like the SCLK & SDATA on this chip are I²C.

author: jpanhalt
author_rank: Super Contributor
timestamp: February 14, 2022, 06:46:07 pm
content: I believe those three pins are inputs, both from this table as well as in the figures. So, yes, they are intended to be used as inputs if the board is properly designed. Sort of like the ICSP pins of Microchip PICs. One could design a board that would not allow them to be used for programming, but most of the time, I don't believe that is done. As for the idle or active state of the chip, it will probably need to be powered to be programmed. I didn't read its manual, but I suspect either idle or active will be OK.

author: Renate
author_rank: Super Contributor
timestamp: February 14, 2022, 07:05:49 pm
content: We're talking idle or active of the thing feeding this Philips chip.(Which we have no idea what it is.)

author: jpanhalt
author_rank: Super Contributor
timestamp: February 14, 2022, 08:02:45 pm
content: Sorry, I missed "host" as being idle. That seems like asking whether you can drive a car while almost asleep.So, I agree, it all depends on what is meant by idle.

author: Logan
author_rank: Frequent Contributor
timestamp: February 15, 2022, 03:43:12 pm
content: Thank you guys.Forget the "idle" part for now, just how to generate such signal, in the easiest way...

author: Renate
author_rank: Super Contributor
timestamp: February 15, 2022, 05:20:56 pm
content: You still haven't said what the host was.If you hold the host in Reset then all the pins areprobablyopen-stated.As far as how to send? Use anything. Either a 5V or 3.3V logic should work fine.Since there is no read-back you're shooting in the dark.You can bit-bop out the 13 bits, there is probably no lower speed limit.Me? I'd just presume that it can take a joke and use SPI to send out 16 bits and have 3 of them overflow.That would be the easiest way.

author: Logan
author_rank: Frequent Contributor
timestamp: February 15, 2022, 05:36:12 pm
content: Quote from: Renate on February 15, 2022, 05:20:56 pmIt's a CCTV camera.It must be sent after the host is fully booted and running, so I can only send the parts I want to change, also avoid to be overwritten by main CPU later.It must be something small and standalone, so I can put it with the camera, and send the data after every power-on.

author: jpanhalt
author_rank: Super Contributor
timestamp: February 15, 2022, 05:55:44 pm
content: I was about to say it looked like 3-wire SPI might work, but after going through some of the Philips stuff, I decided that might be too simple to work without some bit banging.Table 1 seems pretty simple. That is, a 3-bit address (A0..A2) + data bits, which is not unlike 3-wire SPI to LCD's that aren't being read.* However, address b'010' (AGC gain) is expecting 9-bits (D0..D8) for data. Clamp reference, b'100', expects 10-bit data (D0..D9).That said, I would still try sending 16-bits and see what happens (filling with leading or trailing zeros). You could bit-bang that to only 13 bits, but it may not be necessary.Further digging at Philips might give some some example code, if not for your specific chip but for other Philips serial chips.*The LCD in my current project accepts either 8-bit or 16-bit serial, depending on address. Except, the 16-bit is sent as two, 8-bit bytes. Not a big difference as you can leave CS low the entire time.

author: Renate
author_rank: Super Contributor
timestamp: February 15, 2022, 06:55:06 pm
content: Quote from: Logan on February 15, 2022, 05:36:12 pmWell, I understood that a camera interface chip would be found in a... wait for it... a camera!By host, I meant Z80, AVR, STM, etc.In any case, if what you want to do is modify the setup to that chip after the host CPU had already done its bit and not reset the CPU that is another thing.Since the data/clock/enable are not open collector/open drain you're going to have to insert either a Mux or an And or an Or (depending on the resting state of these lines when the CPU is not using it).Or if you really don't care about anything you can live dangerously and just use some beefy TTL 3-state driver to force the lines how you will.