Date   
Re: Programming Issues and Questions

Jack Purdum
 

Howard:

Alas, I don't know anything about compiling on the Mac, but you can ignore the invalid conversion warnings as the compiler can usually resolve those types of warnings. Did you reboot the machine after installing the drivers? I don't know about the Mac, but sometimes driver installation on some versions of Windows doesn't "take" for all applications until the DLL gets registered by the op system. Can't hurt to try.

Jack, W8TEE

On Monday, June 25, 2018, 8:48:28 AM EDT, Howard Fidel <sonic1@...> wrote:


Okay, now it compiles, but it doesn't recognize the Arduino. I installed the CH340 driver, but it didn't help. Anything else I am missing?

Howard


On 6/25/2018 8:12 AM, Howard Fidel wrote:
Peter:
That did it, thanks. I should have remembered that myself, not the first time I experienced it.

Howard

On 6/25/2018 1:59 AM, Peter Aiea wrote:
For what its worth, I had a similar error (function does not return a value) on the macbook. The same code compiled on the win10 system. Updating the arduino ide for the mac to the latest version resolved the compile error.

On Sun, Jun 24, 2018, 20:02 Howard Fidel <sonic1@...> wrote:
Jack:
That helps, but now I get other errors. There are also lots of warnings.

invalid conversion from 'const byte* {aka const unsigned char*}' to 'uint8_t* {aka unsigned char*}' [-fpermissive]

Howard



On 6/24/2018 10:14 PM, Jack Purdum via Groups.Io wrote:
I don't think Farhan meant to return anything from the function. As a test, change the function's signature from:

   int menuBand(int btn){

to

   void menuBand(int btn){

and see what happens. I didn't see any statements in any of the files where a return value from menuBand() is used in an assignment statement, so it should be OK using void.

Jack, W8TEE

On Sunday, June 24, 2018, 5:45:04 PM EDT, Howard Fidel <sonic1@...> wrote:


I am integrating my uBitx into an old HA 350 receiver  chassis. It has a band switch on it, so I want to program A7 to read the switch. I downloaded several different versions of code to find a good starting point. When I use any of Farhan's versions, I get a compile error: 
return-statement with no value, in function returning 'int' [-fpermissive]
 
It is a return in ubitx_menu in the if(!btn) statement that causes this.

I tried Ron, W2CTX's ubitx_V2_00R and i see what looks like coding errors, although it compiles. The error is that A7 is not declared, and digital dash is declared as A3. A3 is PTT
KD8CEC's uBitx_20 compiles. 

Any input on which code is best would be appreciated. I would also like to know how to fix the compiling error so I can reinstall the factory code if I need to.

Thanks,

Howard




Re: ubitx code version 4.3 for review, testing

Jack Purdum
 

Hi Martin:

Not a problem. One other thing: If your project includes a header file (which it should for multiple files), it should be included as:

   #include "myHeaderFile.h"

and not

  #include <myHeaderFile.h>

If you use angle brackets (<>), the compiler only looks in the IDE's libraries subdirectory and default include path for the IDE. By using double quotes, the compiler first looks in the sketch directory for the header file and then on the default include path. You will need to have data declarations in the header file for any globals that are used in multiple source files. To get the most help from the compiler in terms of debugging, there should only be one *.ino file in a project--the file that contains setup() and loop(). All the rest should be *.cpp and a header file (*.h). The globals are defined in the *.ino file, but declared in the *.h file. (Define and declare are NOT the same thing, even though programmers are incredibly sloppy when using these terms.) If you use all *.ino files, you lose type checking across source files...bugs love to hide there!

Jack, W8TEE



On Monday, June 25, 2018, 5:58:00 AM EDT, Martin FKK <g4fkk@...> wrote:


Thanks for answering Craig Jack - I've been wondering about that for a few days :)  You learn something new every day.

Martin - G4FKK

Re: I need a V3 or V4 uBitx board.

 

Hello Guy,

Here is a shot of the relay. They are just cheap Chinese EBay relays, I've been using them for years, they seem to be quite reliable.

Joel
N6ALT

Re: KD8CEC - Nextion Display - IAN questions

 

Rough translation  .... 

 "He is wondering why for firmware v1.094 there are .HEX files available but no source files,  as with his Mac has has no way to transfer .HEX files to the Raduino."

Cheers

Michael VE3WMB 

Re: I need a V3 or V4 uBitx board.

Jerry Gaffke
 

Joel, thanks for the steer on a relay.

I think I managed to decode the print properly from that photo, here's some sources.
Looks like walmart, kmart, newegg, dealextreme are/were also selling them.
I haven't bought any from anybody.

    https://www.banggood.com/10Pcs-HK19F-DC-12V-SHG-Coil-DPDT-8-Pin-Mini-Power-Relays-PCB-Type-p-943270.html

    https://www.amazon.com/uxcell%C2%AE-Coil-Power-Relay-HK19F/dp/B008MPKBZY/ref=pd_sim_263_5?_encoding=UTF8&pd_rd_i=B008MPKBZY&pd_rd_r=0J3E8RBV4QFG1GCHQ9W6&pd_rd_w=Q3vv3&pd_rd_wg=IggiP&psc=1&refRID=0J3E8RBV4QFG1GCHQ9W6
    
Jerry, KE7ER


On Mon, Jun 25, 2018 at 07:09 am, Joel Caulkins wrote:
Here is a shot of the relay. They are just cheap Chinese EBay relays, I've been using them for years, they seem to be quite reliable.

Re: Keypad for Raduino...?

Arv Evans
 

Bob GM4CID

That capacitive keypad is interesting, especially vecause it apparently has I2C bus
interface capability.  Since the Raduino design already includes I2C for the Si5351a
and in my case for an RTC, the keypad could probably share the same bus.
Price is not excessive which is a big plus as well.

Thanks for the info.

Arv K7HKL
_._


On Mon, Jun 25, 2018 at 3:11 AM Robert McClements <gm4cid@...> wrote:
The 16 key TTP229 capacitive touch keypad might be worth considering as an easy low cost external keyboard solution for the uBitx,
it worked well for me on another Arduino project

See http://hobbycomponents.com/sensors/585-ttp229-16-key-capacitive-keypad

Another interesting possibility is using an Android phone or tablet as a touch screen controller
communicating bluetooth to a module at the uBitx.

73 Bob GM4CID

Re: KD8CEC - Nextion Display - IAN questions

Michel Dupuy
 

Thank you Michael for the translation, I could have done with a translator on the internet.

Re: I need a V3 or V4 uBitx board.

Jerry Gaffke
 

The Bitx40 and uBitx use relays with a 12v coil, 
there are some very similar relays out there with 5v coils that would not be suitable.

The relay that hfsignals has been using is harder to find, looks like Amazon did sell them in the past:
    https://www.amazon.in/Sealed-Changeover-Contact-Virtual-Electronics/dp/B076617RK5

Here's an old thread on relays:
    https://groups.io/g/BITX20/topic/bitx40_kit/5069237?p=,,,20,0,0,0::recentpostdate%2Fsticky,,,20,2,0,5069237
I doubt the $0.50 relays being used have any special tricks, so no diodes, no permanent magnets embedded,
these are not latching relays.  Solid state relays are not suitable, they are usually designed for use with 60Hz AC.

Here's the pinout used by HFSignals:  https://groups.io/g/BITX20/message/47000
Though some manufacturers number their pins differently, flipping the relay 180 degrees.

Jerry


On Mon, Jun 25, 2018 at 07:52 am, Jerry Gaffke wrote:
Joel, thanks for the steer on a relay.

I think I managed to decode the print properly from that photo, here's some sources.
Looks like walmart, kmart, newegg, dealextreme are/were also selling them.
I haven't bought any from anybody.

    https://www.banggood.com/10Pcs-HK19F-DC-12V-SHG-Coil-DPDT-8-Pin-Mini-Power-Relays-PCB-Type-p-943270.html

    https://www.amazon.com/uxcell%C2%AE-Coil-Power-Relay-HK19F/dp/B008MPKBZY/ref=pd_sim_263_5?_encoding=UTF8&pd_rd_i=B008MPKBZY&pd_rd_r=0J3E8RBV4QFG1GCHQ9W6&pd_rd_w=Q3vv3&pd_rd_wg=IggiP&psc=1&refRID=0J3E8RBV4QFG1GCHQ9W6
    
Jerry, KE7ER


. . .

 

On Mon, Jun 25, 2018 at 07:09 am, Joel Caulkins wrote:
Here is a shot of the relay. They are just cheap Chinese EBay relays, I've been using them for years, they seem to be quite reliable.

Re: Keypad for Raduino...?

Jerry Gaffke
 

Could work.
Though scanning a keypad with i2c will consume a lot more processor time
than just reading some IO pins.


On Mon, Jun 25, 2018 at 08:02 am, Arv Evans wrote:
That capacitive keypad is interesting, especially vecause it apparently has I2C bus
interface capability.  Since the Raduino design already includes I2C for the Si5351a
and in my case for an RTC, the keypad could probably share the same bus.
Price is not excessive which is a big plus as well.

Re: Keypad for Raduino...?

Robert McClements
 

Arv,

The TTP229 capacitive  keyboard has two pins labelled SCL and SDO but unfortunately they are not I2C.

The way that they work is SCL is clocked frequently up to 16 times and during each clock cycle SDO is
checked. If a key is pressed SDO will return a Low, the count stops and the clock count equates to
the key number. Hope that makes sense, not easy to put into words.

So this device will require the use of two digital pins.


Regards,

Bob GM4CID

Sample code below :-

 // Routine to read if a key is pressed and return its value
byte Read_Keypad(void)
{
   byte Count;
   byte  Key_State = 0;
   for(Count = 1; Count <= 16; Count++) // Pulse the clock pin up to 16 times and read the state of the data pin on each pulse
   {
      digitalWrite(Clock_PIN, LOW);
      if  (! digitalRead (Data_PIN)) // data pin low store the current key number
         Key_State = Count;
      digitalWrite(Clock_PIN, HIGH);
   }
   return Key_State;

Re: Ubitx schematic #ubitx

Jon Titus, KZ1G <tituskz1g@...>
 

Hi, Art.
The Raduino board provides a T/R signal that operates a relay (bottom-left on the schematic). This relay switches power to the RX or TX circuits.  I suggest you use a highlighter to mark TX and RX at the relay with different colors and then peruse the circuit and likewise highlight the TX and RX connections throughout.  The transmit and receive sections then become clearer and you can trace them as you wish.  You also will see TXA, TXB, and TXC.  These signals from the Raduino control the three relays that switch in or out the filters shown in the lower-right section of the schematic diagram.  I hope this info helps.
--
Jon Titus, KZ1G
Herriman, UT USA

Re: I need a V3 or V4 uBitx board.

 

Jerry,

Sorry for the poor picture, that is the correct part number though. These relays have the exact same specifications and pin out as the original one's Farhan used. There is nothing really special about them, you can buy them under a lot of different part numbers and I haven't found one to be any better than another. The yellow color is probably the worst thing about them, but they have been very reliable otherwise. I have also seen these same relays used in commercial equipment I have repaired.

Joel
N6ALT

Re: Keypad for Raduino...?

Arv Evans
 

Jerry

I'm still sticking with my resistor matrix on an ADC port, mostly because I already have the
keypads and this effort is for my own use.  When it is finished (if it gets finished) someone
else may want to duplicate the design as a commercial project, but I'm not going to take on
that level of effort and involvement. 

It seems that the time delay for debouncing a mechanical scanned keypad versus that for
polling an I2C slave may be about equal...?  For the resistor matrix and ADC approach it
now looks like just reading the ADC once (or more if required) in each pass around
"void loop()" will be adequate. At present I'm doing a double read if the value is not zero to
insure that the keypress is valid.  Time to do these reads seems adequate for debounce
requirement.  If the second read is still non-zero it is taken as a valid keystroke and calls
a routine to interpret ADC-to-character and handle the entry.

Arv
_._




On Mon, Jun 25, 2018 at 9:23 AM Jerry Gaffke via Groups.Io <jgaffke=yahoo.com@groups.io> wrote:
Could work.
Though scanning a keypad with i2c will consume a lot more processor time
than just reading some IO pins.

On Mon, Jun 25, 2018 at 08:02 am, Arv Evans wrote:
That capacitive keypad is interesting, especially vecause it apparently has I2C bus
interface capability.  Since the Raduino design already includes I2C for the Si5351a
and in my case for an RTC, the keypad could probably share the same bus.
Price is not excessive which is a big plus as well.

Re: Keypad for Raduino...?

Arv Evans
 

Bob GM4CID

Okay.  Thanks for the heads-up.  I might have some day proceeded blindly thinking
that this was an I2C or TWI data bus.  Guess that is another reason why I am going
ahead with my existing junkbox keypads and resistor matrix approach. 

My guess is that there probably are I2C keypads, or that some sort of bus adapter
IC would work, but I'm not going there for the immediate future.

Thanks,

Arv  K7HKL
_._


On Mon, Jun 25, 2018 at 9:38 AM Robert McClements <gm4cid@...> wrote:
Arv,

The TTP229 capacitive  keyboard has two pins labelled SCL and SDO but unfortunately they are not I2C.

The way that they work is SCL is clocked frequently up to 16 times and during each clock cycle SDO is
checked. If a key is pressed SDO will return a Low, the count stops and the clock count equates to
the key number. Hope that makes sense, not easy to put into words.

So this device will require the use of two digital pins.


Regards,

Bob GM4CID

Sample code below :-

 // Routine to read if a key is pressed and return its value
byte Read_Keypad(void)
{
   byte Count;
   byte  Key_State = 0;
   for(Count = 1; Count <= 16; Count++) // Pulse the clock pin up to 16 times and read the state of the data pin on each pulse
   {
      digitalWrite(Clock_PIN, LOW);
      if  (! digitalRead (Data_PIN)) // data pin low store the current key number
         Key_State = Count;
      digitalWrite(Clock_PIN, HIGH);
   }
   return Key_State;

Re: Bad Relay #ubitx

Jon Titus, KZ1G <tituskz1g@...>
 

Relay K1 caused problems here, so I removed it and replaced it with a DPDT switch.  I also added LEDs to the TX and RX signals to indicate the transceiver mode.  I like this arrangement better than a PTT pushbutton or CW-key activation.

Several people have commented on device-unsoldering practices.  I suggest you use solder wick or a solder sucker to remove most of the solder.  A small culinary blowtorch (yes, really) can deliver enough heat to melt the remaining solder so you can extract the relay.  To protect nearby solder connections, get some gauze bandage pads and wet them with distilled water.  Place the damp pads around the relay contacts on the solder side of the board and use the torch to apply just enough heat to melt the solder.  The relay should pull right out.
--
Jon Titus, KZ1G
Herriman, UT USA

Re: KD8CEC - Nextion Display - IAN questions

Art Olson
 

Michael

Link below is for xloader for MAC


73
Art N2AJO 


On Jun 25, 2018, at 10:51 AM, Michael Babineau <mbabineau.ve3wmb@...> wrote:

Rough translation  .... 

 "He is wondering why for firmware v1.094 there are .HEX files available but no source files,  as with his Mac has has no way to transfer .HEX files to the Raduino."

Cheers

Michael VE3WMB 

Re: Ubitx schematic #ubitx

Art Olson
 

Jon
Thanks 
73
Art


On Jun 25, 2018, at 11:41 AM, Jon Titus, KZ1G <tituskz1g@...> wrote:

Hi, Art.
The Raduino board provides a T/R signal that operates a relay (bottom-left on the schematic). This relay switches power to the RX or TX circuits.  I suggest you use a highlighter to mark TX and RX at the relay with different colors and then peruse the circuit and likewise highlight the TX and RX connections throughout.  The transmit and receive sections then become clearer and you can trace them as you wish.  You also will see TXA, TXB, and TXC.  These signals from the Raduino control the three relays that switch in or out the filters shown in the lower-right section of the schematic diagram.  I hope this info helps.
--
Jon Titus, KZ1G
Herriman, UT USA

Re: Keypad for Raduino...?

Jerry Gaffke
 

Here's a datasheet  (sort of, you don't get the pdf):  https://pdf1.alldatasheet.com/datasheet-pdf/view/810501/TONTEK/TTP229.html
Bottom of page 8, section 3-4 describes the 2 wire interface, though not very clearly.

They say SDO is always out, SCLK is always in.
And that SCLK can be anything between 1khz and 512khz when scanning.
A pause of 2ms on SCLK resets the interface for the next scan.
They apparently have a way to just check the state of SDO occasionally to see if any key was pressed,
though I find the datasheet tough to read on exactly how this works.

The chip also implements full i2c mode, also various parallel modes,
though not clear what modes any particular keypad using the chip would support.

Jerry


On Mon, Jun 25, 2018 at 08:38 am, Robert McClements wrote:
Arv,

The TTP229 capacitive  keyboard has two pins labelled SCL and SDO but unfortunately they are not I2C.

The way that they work is SCL is clocked frequently up to 16 times and during each clock cycle SDO is
checked. If a key is pressed SDO will return a Low, the count stops and the clock count equates to
the key number. Hope that makes sense, not easy to put into words.

So this device will require the use of two digital pins.


Regards,

Bob GM4CID

Sample code below :-

 // Routine to read if a key is pressed and return its value
byte Read_Keypad(void)
{
   byte Count;
   byte  Key_State = 0;
   for(Count = 1; Count <= 16; Count++) // Pulse the clock pin up to 16 times and read the state of the data pin on each pulse
   {
      digitalWrite(Clock_PIN, LOW);
      if  (! digitalRead (Data_PIN)) // data pin low store the current key number
         Key_State = Count;
      digitalWrite(Clock_PIN, HIGH);
   }
   return Key_State;

Re: Schematic . . . What Schematic . . mine?

Jon Titus, KZ1G <tituskz1g@...>
 

Suggestion:  It's a good idea for us to keep lab/project notes and info in a spiral-bound notebook.  Then we have everything we need and in chronological order.  Tape in program code, which we should label with a time, date, and version number.  Logic-analyzer and scope traces also help document what we did and the results we saw.  A separate folder for a project also helps keep loose papers in one place. 
--
Jon Titus, KZ1G
Herriman, UT USA

Re: Keypad for Raduino...?

Arv Evans
 

Jerry

Thanks for the info.  I did a quick scan of the relevant pages. I can see several possible
uses for this device.  Maybe I missed something but it seems that  like almost all I2C
devices it is a true slave and thus does not automatically assert bus control to signal that
an event has occurred.  Possibly I would need to re-read the datasheet in detail to affirm
this if my design effort takes me in that direction.

Arv
_._


On Mon, Jun 25, 2018 at 10:05 AM Jerry Gaffke via Groups.Io <jgaffke=yahoo.com@groups.io> wrote:
Here's a datasheet  (sort of, you don't get the pdf):  https://pdf1.alldatasheet.com/datasheet-pdf/view/810501/TONTEK/TTP229.html
Bottom of page 8, section 3-4 describes the 2 wire interface, though not very clearly.

They say SDO is always out, SCLK is always in.
And that SCLK can be anything between 1khz and 512khz when scanning.
A pause of 2ms on SCLK resets the interface for the next scan.
They apparently have a way to just check the state of SDO occasionally to see if any key was pressed,
though I find the datasheet tough to read on exactly how this works.

The chip also implements full i2c mode, also various parallel modes,
though not clear what modes any particular keypad using the chip would support.

Jerry


On Mon, Jun 25, 2018 at 08:38 am, Robert McClements wrote:
Arv,

The TTP229 capacitive  keyboard has two pins labelled SCL and SDO but unfortunately they are not I2C.

The way that they work is SCL is clocked frequently up to 16 times and during each clock cycle SDO is
checked. If a key is pressed SDO will return a Low, the count stops and the clock count equates to
the key number. Hope that makes sense, not easy to put into words.

So this device will require the use of two digital pins.


Regards,

Bob GM4CID

Sample code below :-

 // Routine to read if a key is pressed and return its value
byte Read_Keypad(void)
{
   byte Count;
   byte  Key_State = 0;
   for(Count = 1; Count <= 16; Count++) // Pulse the clock pin up to 16 times and read the state of the data pin on each pulse
   {
      digitalWrite(Clock_PIN, LOW);
      if  (! digitalRead (Data_PIN)) // data pin low store the current key number
         Key_State = Count;
      digitalWrite(Clock_PIN, HIGH);
   }
   return Key_State;