Arduino connection to ProgRock


Syd
 

On page 6 of the Operating manual there is a diagram showing how to wire the Arduino via serial tx/rx data lines to the ProgRock. Looking at the diagram on page 6 and looking at the Arduino PCB I see a tx and an rx label on pins 1 & 2 of the Arduino board. But the given diagram shows connecting to pins 10 & 11 on the Ardino!  What are the correct connections? When I enter ? in the Arduino console I can see the Rx LED blink on the Arduino board (when I send data to the ProgRock), but I don't get any reply from ProgRock in the console. Is this diagram correct for wiring to pins 10 & 11? I did set up  9600 baud and CR/LF into the Arduino console setup. So I'm kinda stumped here.
syd/wt1v


Mont Pierce KM6WT
 

Yes, use pins 10 & 11. 

The sketch from the ProgRock Op Manual that you downloaded to the Arduino, look at line two, and you'll see:
           SoftwareSerial mySerial ( 10, 11 );  // RX, TX

When you download and run the sketch, do you see the text "Monitoring serial !"

When ProgRock powers on, you should see:
      QRP Labs, 2017
      Pr1.02

If you don't see the above text, swap the wires going to Arduino pins 10 & 11, and power off/on the ProgRock again.


73,
km6wt


geoff M0ORE
 

If you look at the picture on page 6, you can clearly see that the connections to the Arduino use pins 10 & 11. Don't forget that a jumper wire has to be fitted to set the unit in serial programming mode. This is shown on page 5. If you already have the DIP switch installed, you can just set the relevant switch.


Syd
 

The DIP is set for serial mode, and just to make sure I set the correct switch I ohmed the uProc pin to gnd to ascertain the correct DIP switch was set.


Syd
 

From what I see you have worked with Arduino a lot more than I have. You are mentioning a sketch in the Op Man, which I can find, and then running this code as an executable. Nice for an experienced Arduino programmer/developer which I'm not. I am experienced in using Eclipse for Java, C, & C++, but have no experience with Arduino. I just want to connect to the ProgRock and configure the registers; therefore, I am using the Arduino Serial Monitor tool in the IDE.  It's set up for 9600 baud and CR/LF and does connect to COM3 in my case. Simple commands like ?, [reg] ?, and [reg] = xxxxxxxxxx are the only thing I need to communicate with ProgRock. Your sketch looks like a nice alternative solution, but I think the Serial Monitor would be simpler to use. Although, if I could figure out how to put in the example code from the manual and run it, it might be a nice alternative. How would I do this?
73 wt1v


Hans Summers
 

Hi Syd

The ProgRock has a 9600-baud serial port (USART)

Your PC has USB (Universal Serial Bus) ports. 

In order for the PC to talk the ProgRock you need something to convert between 9600-baud serial data and USB. You can buy little boards for a few $. OR, you can program an Arduino to do the job. In order to program the Arduino to do the job, you have to upload a certain sketch into the Arduino, using the Arduino IDE. This sketch is described and provided in the ProgRock manuals. The sketch creates a virtual serial port on two pins, that you specify - which in the sketch, are pins 10 and 11. It reflects any serial data on this virtual serial port, to its serial port that is connected to the Arduino USB connector. And vice versa. 

Once you have the conversion between 9600-baud serial and USB sorted out, you then need a terminal emulator program on the PC, to be able to type commands to the ProgRock and display the result. There are many suitable terminal emulator programs and I often use PuTTY. The "Serial Monitor" tool in the Arduino IDE is really just a specialized version of one of these terminal emulators, which can transmit serial data commands to a USB port and display the results. 

The fact that you may use the Arduino as USB to Serial converter, is entirely unconnected to whether or not you use the Arduino "Serial Monitor" tool as your way of communicating with ProgRock. For example, you could use a commercial USB to Serial converter board, and still use the Arduino IDE "Serial Monitor" tool to talk to it - even with no Arduino connected to your PC at all. AND, you could use a different terminal emulator like PuTTY to talk to an Arduino which was programmed as USB to Serial converter using the provided sketch - without using the Arduino IDE at all. 

I suspect that you have not fully understood the above, and that you are trying to use the Arduino "Serial Monitor" tool to talk to ProgRock via a connected Arduino, without realizing that you need to program the Arduino to act as the intermediary converter. Until you program the Arduino properly with the sketch, and connect the pins 10 and 11 to ProgRock, it will not work. 

73 Hans G0UPL
http://qrp-labs.com

On Tue, Jun 22, 2021 at 5:50 PM Syd via groups.io <nhuq1=yahoo.com@groups.io> wrote:
From what I see you have worked with Arduino a lot more than I have. You are mentioning a sketch in the Op Man, which I can find, and then running this code as an executable. Nice for an experienced Arduino programmer/developer which I'm not. I am experienced in using Eclipse for Java, C, & C++, but have no experience with Arduino. I just want to connect to the ProgRock and configure the registers; therefore, I am using the Arduino Serial Monitor tool in the IDE.  It's set up for 9600 baud and CR/LF and does connect to COM3 in my case. Simple commands like ?, [reg] ?, and [reg] = xxxxxxxxxx are the only thing I need to communicate with ProgRock. Your sketch looks like a nice alternative solution, but I think the Serial Monitor would be simpler to use. Although, if I could figure out how to put in the example code from the manual and run it, it might be a nice alternative. How would I do this?
73 wt1v


Arv Evans <arvid.evans@...>
 

Did you first check the voltage put out by your VOM or DVM  when set to ohms
to ensure that you are not damaging components with over-voltage from the meter?

Arv
_._


On Tue, Jun 22, 2021 at 8:19 AM Syd via groups.io <nhuq1=yahoo.com@groups.io> wrote:
The DIP is set for serial mode, and just to make sure I set the correct switch I ohmed the uProc pin to gnd to ascertain the correct DIP switch was set.


Mont Pierce KM6WT
 

On Tue, Jun 22, 2021 at 08:46 AM, Hans Summers wrote:
 
In order for the PC to talk the ProgRock you need something to convert between 9600-baud serial data and USB. You can buy little boards for a few $. OR, you can program an Arduino to do the job. In order to program the Arduino to do the job, you have to upload a certain sketch into the Arduino, using the Arduino IDE.
Hi Syd,

As Hans mentions, yes, you can use an Arduino, but as he says, it requires loading the sketch into the Arduino IDE, and then programming the Arduino board.  The Arduino might be a good option for those who are already playing with Arduino programming and have a couple of boards laying around...  But not the best choice if you have to buy something just to convert USB to TTL Serial...

The little boards Hans mentions that convert USB to TTL Serial are cheaper, and easier to hookup and use.
Here's an example of one for about $6 on Amazon (click here).  You can also use it to power the ProgRock.

Also, PuTTY is a much better terminal program than the Arduino Monitor utility...\

When I tried the Arduino monitor, it just shows everything on one long concatenated line...
(I probably don't have it configured right, but cannot see where to change it...)


73,
km6wt


Syd
 

Hans
  After monkeying around I think I got it! Copy and paste the source code, SoftWareSerial, from the manual into a new sketch. Verify, compile and then upload into the Arduino. Having the ProgRock up and running before executing the code might be a nice idea, as well as using 4 on the DIP switch to enable serial data communication when the ProgRock is powered up. The TeraTerm software might be nice to experiment with in the future, but I think what you gave me is the simplest way to go for now! I did try the blink example and that's where I figured out how to compile, and upload to Arduino.
73 wt1v


Syd
 

That line that you are showing looks like a constructor, maybe from JAVA! That does make the serial connection.  The "monitoring serial !" text is sent from the program right into the monitor display window to show that the connection has been made. If the connection was never made, then the connection loop would gone on forever and this message would not get displayed.

When I connect power to the ProgRock the LED on the ProgRock goes on all the time, I hope that's good. I have the DIP switch #2 set to on to go into serial data mode upon power up and that looks OK.

When I enter the sketch from page 7 of the operating manual, and then compile and load the executable into the Arduino board I do get the "Monitoring serial !" message in the serial monitor window.  So it looks like the program was loaded and has made a connection to pins 10 &11! Then the program goes into the send/receive loop. If I then power up the ProgRock I get no message from the ProgRock board as you show above! I did switch the wires around going to  pins 10 & 11, and still got no message or a reply when I enter '?' and then send in the monitor window! 

Just before making this post, I had a mishap: the gnd wire to the ProgRock board broke off and I didn't notice it when I powered up the ProgRock! After doing so I saw in the serial monitoring window an infinite series of gibberish text, mostly ? marks!  So I guess, through this mishap, that I can receive serial data from the ProgRock board to the Arduino via the USB port!  Unfortunately when I rewire in the ground wire I go back to not receiving anything from the ProgRock board.
syd/wt1v