Ok, here's the situation. I've a custom PCB with an arduino chip (atmega328p, same as uno) on it, the usual serial pins, i2c pins and spi pins on this PCB are all taken up with things related to the PCB's functionality. I need to read out, to a log file on a PC, some special data as read on the PCB, and it must be done in situ on the PCB.
I can lift the arduino chip out of the custom PCB, it is mounted in a DIP socket, easily and put new programs on to it.
I need to put a program on this PCB's atmega which will let it read from sensors on the PCB and output lots of data over serial so it can be gather up in the serial monitor, then copeid to a text file to be processed.
I have an idea but need to check feasibility.
On the custom PCB I have 4 pins which are, luckily, broken out to header pins. 2 of them are directly wired to header pins but tricky to reach. The more accessible header pins each run through an on-board 2Kohm SMD resistor before getting to the breakout header.
To be clear, I am not trying here to copy a program off the arduino chip, I wrote the program on it and have not lost it, this is not about recovering data from an arduino. It is about getting live sensor data off the board, I only need to do this once, but need to collect about 3 minutes of data at a line (3 floating point numbers, 8 significant figs each) every 0.05 seconds. The PCB, when I designed it, was not expected to ever interface with a computer, so I just program the atmega in a separet board, then lever it out between DIP sockets, hence no easily reachable serial pins on the custom board. Going through the 2K resistors is the easiest way to repurpose some of the existing wires on the board for data logging purposes.
Is the following at all possible:
1.Can I use some form of software serial (which must NOT use weird interrupts that may interfere with the arduino on this PCB acting as an I2C master to stuff on this PCB ) to use two of arduino pins 4,8,5 or 12 (physical pins 6,11,14, or 18) to output serial?
2.For physical accessibility reasons it is easier for me to make use of 4 and 8, but they each have a 2K res along the trace in series between the arduino pin and the header, can serial work through what is effectively a pair of highly resistive 2K wires?
3.How then do I get this serial data to a PC? Do I use a second arduino to receive it, maybe through soft serial on a pair of pins, then relay it over the usual serial to send to the PC's serial monitor? Is there a sketch already in existence which does this? it just seems like the sort of thing where timings between both reading one serial and sending on another could cause chaos? Or do I take the atmega328p chip out of an arduino board, wire the serial wires from the custom PCB in to this uno board's pins 0 and 1 of the emptied board and let the ftdi stuff on that board get the serial data to the PC?
Thank you