PGA308 library

Hello,

I'm looking for PGA308 library that will allow me to communicate with that amplifier. Anyone has one or can help me with making one?

I'm not into communication protocols, so I've got hard time starting with that.

Noone has ever worked with that PGA?

What have you tried ? Can you show a test sketch ?

It seems that it is a UART/Serial communication with automatic baudrate detection for a baudrate between 4800 to 114000 baud and with a combined RX/TX signal.
You need a Serial port of the Arduino and use extra hardware to combine the RX and the TX pin.
In the datasheet they recommend to use a open drain for the TX. But then the Arduino TX has to be turned into a open drain without inverting the signal.
The datasheet shows that the 1W pin can source with 4mA. The datasheet also tells that the TX may be used without open drain. I see some possibilities there.

You can connect the 1W to Arduino RX (you will also receive the data that you have transmitted).
You can connect the Arduino TX via a 4k7 or 10k resistor to 1W.
That should be enough.
When the TX is idle, it is high. That will serve as a pullup for the 1W pin.

Warning: This has nothing to do with the Dallas 1-Wire protocol or the OneWire library !

When you use a software Serial port, then you are asking for trouble. Those software serial port have trouble transmitting and receiving at the same time. Since the RX will receive what the TX is sending, that is a problem for software libraries.

According to the datasheet, it is possible to combine the 1W signal with Vout. Please don't do that, it makes things complicated.

I suggest to use 9600 baud, and send data according to the datasheets and examples. For example this: openlab/pga308.c at master · hikob/openlab · GitHub.

In the datasheet is described that 10-bit periods are used and a startbit should be '0', then databits, then a stopbit of '1'. You don't have to worry about that, it is exactly what a TX pin of a Arduino is doing with the Serial library. That is just default 8N1 serial protocol.

Hmm.. I though it's the same as 1-Wire for temp sensors, but if it is using RX/TX then I'll leave that idea.. I'll just stick to AD8237 + DAC...