Configuring HC12

friis

Senior Member
Hi,
I have been trying to configure 2 HC12 transceivers using a pgm I have used succesfully before on the 2 HC12s several times. I get "No response" (5 of them) or 5 identical answers containing mostly hex characters (the same every time).
I have had the problem before a long time ago. This time I had the configuring working for a while after having fiddled with power, gnd.,Rx,Tx and Set terminals on the HC12 with a multimeter, but it soon stopped working again - and I dont know what I did to make it work. The last time I just changed the HC12s.

I found on Internet the following method to reset HC12:

(AlbertHall May 25, 2018)
Joined Jun 4, 2014

I have now solved this conundrum. The sequence should be:
Hold SET low.
(delay)
Power up HC-12.
(delay)
Maintain SET low. The HC-12 interface will now be the defaut 9600, 8, n, 1
Send commands to configure the HC-12 as you wish.
Take SET high.
(delay)
The HC-12 will now be using whatever configuration you set.

The HC12s with which I have the problem is soldered in place and I had to disconnect the HC12 and reconnect it at "Power up HC12, but then the the pgm starts all over.

My question is: Is there an authorised way of reseting a HC12 (soldered in place) that has gone haywire or must I consider it lost (2 at the same time)?
One of the HC12s is powered by 3 AAs so overloading the HC12 cannot have happened.
Best regards
torben
 

AllyCat

Senior Member
Hi,
"Hold SET low.
(delay)
Power up HC-12."

; I had to disconnect the HC12 and reconnect it at Power up HC12, but then the the pgm starts all over.
You may need a reply from one of the HC-12 experts, but as far as the procedure above is concerned, you need SEPARATED supply rail connections to the PICaxe and to the HC-12.

The "obvious" solution is to have a "switch" in series with the HC-12 supply, controlled by a PICaxe pin. That's been discussed recently on the forum, and a BC327 PNP transistor with about 330 ohms from its base to a PICaxe pin should be "good enough". Or a Logic Level P-channel MOS FET may be a better (but more expensive) option.

Alternatively, you might be able to isolate the PICaxe from the main supply with a diode and keep the PICaxe running (at low power) from a large decoupling capacitor, whilst you briefly disconnect the main supply rail. But the procedure described above doesn't specify how long the "(delay)" needs to be?

Cheers, Alan.
 

PhilHornby

Senior Member
My question is: Is there an authorised way of reseting a HC12 (soldered in place) that has gone haywire or must I consider it lost (2 at the same time)?
I currently have twelve HC-12's in service and over the years some of them have ceased to function :(. In all cases though, it's been the Radio side that has malfunctioned (going "deaf", but still able to transmit - that sort of thing). The interface to the on-board microprocessor has never ceased to function; they've always responded to commands, even if they were otherwise useless. I have never managed to resuscitate a dead HC-12...

I have some that are powered by AAA cells and when the battery voltage falls, the Radio stops working first. Luckily the Picaxe still runs and knows the link is down and so can at least flash an LED as an indication.

Every HC-12 I've received has been set to 9600baud and that is how I use them in service. I've never needed to configure them manually or externally - it's just done by the Picaxe at power-up.

See: (1) Demonstration of HC-12 radio module configuration | PICAXE Forum
 

friis

Senior Member
Hi AllyCat and PhilHornby,
I got one HC12 working (apparently permanently) by installing a switch that allowed me to power the HC12 independently of the Picaxe and using the "low HC12_SET - pause - power the HC12 - pause - configure" method as proposed by you. The other HC12 was irretrievably destroyed - somehow.

"....over the years some of them have ceased to function". That bothers me - I am relying on the HC12 to be working. But I have seen it too.
"Luckily the Picaxe still runs and knows the link is down....". I need an alarm for that.
t
Thank you very much.
torben
 

AllyCat

Senior Member
Hi,
The "obvious" solution is to have a "switch" in series with the HC-12 supply,
I got one HC12 working (apparently permanently) by installing a switch that allowed me to power the HC12 independently of the Picaxe
Of course the simplest switch is a "pin-link", for example two header pins (or pads) linked by a bridge. Then you can remove the link for "a long time" to ensure that the HC-12's supply rail falls to zero (eventually). Otherwise, the discharge time of the HC-12's supply decoupling capacitor(s) might be "unknown".

Therefore, for a more "rigorous" solution, it could be worthwhile to add a "pull-up resistor" (perhaps 10k) from the SET pin to the HC-12's supply pin (or ensure that one is already present). Then, when you execute the "Hold SET Low" part of the routine, the (implied) "disconnect the HC-12 supply" will give a guaranteed power-down within a reasonably short time.

Cheers, Alan.
 

Jeremy Harris

Senior Member
I have half a dozen HC-12s around the house doing various jobs and have found that the easy way to re-programme them (if I need to change the frequency or mode for some reason) is to make sure that the Picaxe that's driving them is in a socket and to fit the HC-12 to the PCB with a long header, with the five long pins poking up far enough out of the HC-12 that it's just possible to get a header connector on them.

I have a USB to serial FTDI board fitted in a small box with a switch on the side to switch the +5V on and off on the output side and a lead coming out with a 5 pin header on, that has the "set" pin connected to 0V. The re-programming process is then dead easy, just power off the circuit, unplug the Picaxe from its socket, plug the FTDI box into a USB port, plug the header into the HC-12 and then run the very useful HC-12 programming utility written by Robert Rozee and that has been linked to here before in one of the HC-12 threads.

I've found these modules to be very reliable and have yet to have a failure after several years of use. I have had a pair running in their longest range mode over a distance of around half a mile for around 3 years now, without a single glitch.
 

manuka

Senior Member
Before my needs were swayed by LoRa (& other micros...) I was an enthusiastic HC-12 user & still consider them great "bang for buck" performers.

Perhaps for those who've just come in (!) herewith gathered 2016 era HC-12 info.
---------------------------------------------------------------
The best download location for the HC-12 config utility is from fellow Kiwi Rob. ROZEE's github page:
This includes the delphi 5 source code.

The direct link to the .exe is:
-------------------------------------------------------------

Note: Perhaps arising from cussed clone/fake issues, the 400kHz channelled Si4463 based HC-12 has been upgraded (?) by a similarly priced Si4438 100kHz spaced GT-38 (= Shenzhen based "Guoyan Tech.")

Stan. (in NZ)
 

Attachments

Last edited:
Top