URF/ERF programming

keith j

Member
Hi All,

I have managed to connect the ERF to the AXE020 board (and have a heart beat), the URF is connected to the USB port and also has a heart beat. In setting up the URF bit when it came to assigning the PICAXE chip there was no option for a 28X1 chip (which I am using) only a 28X2. Should I choose 28X2 (will this make a difference?) if so the serial input pin is pin 6, the output is pin 7 on the 28X1 (the options given in the wizard (for 28X2) are: A0-3, B0-7, C0-7 which do I choose?) - or will I have to get a 28X2 chip?

Help please

Thanks

Keith
 

hippy

Technical Support
Staff member
To configure an ERF module with a PICAXE it must be connected to I/O pins rather than the programming Serial In and Out legs as the download cable is used to report configuration progress back to the Terminal window.

ERF and URF modules should be pre-configured to work out of the box so it should not normally be necessary to reconfigure either.

If reconfiguration is required it would be recommended to use a PICAXE M2 or X2 as the ERF Configuration Wizard specifically supports those. It may be possible to modify the configuration program to configure an ERF module using an X1 but this is unlikely to be trivial.
 

keith j

Member
Hi Hippy,

Just out of 'got nothing to use' used pins B6 & B7 for the Rx & Tx settings in the URF wizard for a 28X2 chip and it works for a 28X1 chip too. This may be of interest or help to anyone else attempting this.

Regards

Keith
 

hippy

Technical Support
Staff member
used pins B6 & B7 for the Rx & Tx settings in the URF wizard for a 28X2 chip and it works for a 28X1 chip too.
Edited: Having re-read the opening post, I am a bit concerned we may be talking at cross-purposes. You seem to be configuring a URF but selecting a PICAXE and specifying its pins. I am a bit lost as to what you are actually doing or trying to do, what you are setting up, which wizard you are using.
 
Last edited:

keith j

Member
Hi Hippy,

Sorry I was not clear on what I was asking. Hopefully I can be clearer this time.

The wizard is part of the download from the picaxe website as a zipped folder which also includes the drivers for the URF.

I was following the set up wizard for the URF (the ERF was successfully connected to the picaxe as you previously described on another thread). The wizard asked for type of picaxe chip but did not give a 28X1 as an option (which is the chip I am using) and it also asked for which pins from the chip were the serial in and out and connected to the Tx & Rx on the ERF. As there was no option in the drop down in the wizard for a 28X1 picaxe chip, I asked if I could use the 28X2 option (or did I have to get a 28X2 chip).

While I was waiting I decided to try the 28X2 option (figuring it would either work or it would not), then used B6 &B7 as options for the pins. This was successful in that the programme from Logicator was successfully transmitted from the URF and received by the ERF & the 28X1 chip, and the picaxe successfully ran the transmitted test programme that I had written.

I thought this may be of use to others who may be trying to set up the URF using the wizard, and using a 28X1 chip, and were in the same confused as myself (this being the first time I have tried using this programming system (until this project I have always been able to re-programme using the download cable).


Regards

Keith
 

hippy

Technical Support
Staff member
Sorry I was not clear on what I was asking. Hopefully I can be clearer this time.
Thanks.

I think you might have old versions of the wizards or are running the ERF Configuration wizard which isn't usually necessary - That's only used to configure an ERF module using a program downloaded to the PICAXE.

I am not aware of the URF wizard needing to know, nor asking for, which PICAXE type it is communicating with or how that is connected; to work for program download the ERF must be connected to the Serial In and Out legs.
 

keith j

Member
Hi All,

I have encountered new problems with the URF/ERF module pair. I have managed to get it to work once only, now all I get is an error message on the computer saying hardware not found, turn it on, lead not in the correct com port etc. When I check the com ports in logicator, it has the software for the download lead but does not mention URF? I have downloaded and installed the extra software for this. I can reprogram using the cable so the AXE020 board, 28X2 chip etc are ok.

All the connections to the ERF seem ok and it has a heart beat, When I plug the URF into the computer I also get a heart beat

I am now totally confused as to what I have got wrong, help please!

Thanks Keith j
 

BeanieBots

Moderator
Sounds like your PC is not recognising the URF.
Double check your comms ports.
Mine calls it "communication port" (or somnething very similar)
Make sure you plug it into the same USB port each time.
 

keith j

Member
I have tried this now, with no effect - I still get 'cannot find hardware, check its turned on, may need to reset etc' message.

I am at a loss!

I am considering removing logicator and all the drivers, then re-installing it all to see if that works.

If not what next, is there a fault in the URF? - if so I may have to consider buying a new ERF URF pair!

Once again any advice would be most welcome

Thanks

Keith
 

hippy

Technical Support
Staff member
Have a look in Windows Device Manager. Something identifying the URF device should appear when it is connected to the PC and disappear when it is disconnected.
 

keith j

Member
Hi All,

I think we are slowly closing in on the problem!

Have checked the device manager, and the URF is visible to the computer in the way you would expect, but the URF/ERF link does not work in that the error message 'hard wear not found' etc. Coukld the problem then exist somewhere between the URF and the picaxe chip? Is it worth re installing Logicator before pursuing the problem at the other end of the link before succumbing to buying another URF/ERF pair (which I would rather not do!)

Many thanks

Keith
 

BeanieBots

Moderator
Hi All,

I think we are slowly closing in on the problem!

Have checked the device manager, and the URF is visible to the computer in the way you would expect, but the URF/ERF link does not work in that the error message 'hard wear not found' etc. Coukld the problem then exist somewhere between the URF and the picaxe chip? Is it worth re installing Logicator before pursuing the problem at the other end of the link before succumbing to buying another URF/ERF pair (which I would rather not do!)

Many thanks

Keith
It could be the URF/ERF setup (have you changed anything from as new?)
It could be a hardware issue at the PICAXE end.

I would NOT re-install any software and I would net yet consider buying more URF/ERF units.
I would program the PICAXE (via cable) to send a simple text message (sertxd) and see if a terminal program can pick it up from the assigned comm port.

If you have done ANY configuration writes to either module, it is possible that can no longer do a download but may still talk to each other.
If you have played with PANID or channels, then they may not want to talk to each other at all.
Either of the above are recoverable but may need some work to determine what and how.
(eg interrogate to find out what the PANID actually is. Easy for URF but tricky for ERF).

I've done a lot of 'messing' with mine and haven't bricked one yet!
Though I did think I had for a while until I got the settings 'sensible' again.
 

keith j

Member
Hi

Thanks - I may have adjusted something unknowingly - will check to see if the settings for each are different etc as you suggest. I am reasonably convinced it is not the hardware from the AXE020 board to the ERF as I have just checked the wiring.

Regards

Keith
 

Buzby

Senior Member
... I've done a lot of 'messing' with mine and haven't bricked one yet!
Though I did think I had for a while until I got the settings 'sensible' again. ...
I had exactly the same experience, that's why I'm not offering my advice !
 

keith j

Member
Hi All,
I have tried the sertxt with no result, I have put an LED on the DTR to grnd and I get a flash when the ERF transmits. I have yet to try it when transmitting from the URF. I have not altered the PANID settings.....the saga continues!

regards

Keith
 

hippy

Technical Support
Staff member
When one hits a brick wall it is often best to step back and check the basics; wire up the ERF so it is powered, CTS is to 0V, and TX is linked to RX, no PICAXE connected to it. Within Programming Editor, select the URF COM port, open the Terminal window; anything sent via the URF should be echoed back by the ERF and shown on the display.
 

keith j

Member
Hi All,

I have attached a tell tale led to the DTN pin as per thewiring diagram. The led flashes when I run the sertxt command, also briefle flashes when the URF is used just before the error messages appear. It seems there is some activity but the URF/ERF cannot recognise each other

Regards

Keith
 

hippy

Technical Support
Staff member
Did you try what was suggested in post #18 ? That will confirm data can get both to and from the ERF.

The other possibility is that you have downloaded a program into the PICAXE which now requires it to be Hard Reset using a power-off-then-on cycle for a subsequent download. Note that to do that while using an ERF the power must be removed from the PICAXE but kept supplied for the ERF.
 

keith j

Member
Hi Hippy

Building the circuit to check, but did not know that a hard reset required power to be maintained to the erf - I presume the reset button on the board severs all power to the board and anything else attached to it?

Regards

Keith
 

hippy

Technical Support
Staff member
I presume the reset button on the board severs all power to the board and anything else attached to it?
On a 28X2 and 40X2 the reset button does a Hard Reset for the PICAXE without removing any power; using that for a 28X2 or 40X2 is okay, no need to power-cycle off then on.
 

keith j

Member
Hi all

Have wired and tested as per post 18 and have got the same data back that was transmitted from the URF. So at least the URF/ERF now see and talk to each other! This is progress I think.

I guess the problem is between the ERF and the PICAXE?

Regards

Keith
 

BeanieBots

Moderator
That's good news and does suggest that the units are OK.
Now you have that working, try sending via sertxd and then try to receive as well.
If both of those work but programming still gives an error, it might be that you did not select the "use for PICAXE programming" (or very similar wording) option when making some of your configuration changes.
One step at a time.
 

keith j

Member
Hi All,

Sorry for the delay in getting back to you - life got in the way!

Nothing much has changed!

Since BeanieBots post:

we have tried sending using sertxt but are having difficulty knowing if what we are doing is correct (no reliable result).

Have checked the URF configuration and the program for picaxe box is checked etc.

We have rewired the interface between the picaxe board and the ERF (just to be sure)

The 'tell tale' LED now flashes a lot when we try to programme anything (rather than just a flicker).

Still getting the same error message - picaxe not turned on, not connected, needs a reset.

But am now confident that the URF and ERF are communicating (the test described in post 18 and the led tell tale).

not sure where to go now.

Regards

Keith
 

hippy

Technical Support
Staff member
With URF to ERF and back again comms working, the next thing is ( with ERF on non-programming pins of the PICAXE ) to check that you can

1) Use SEROUT to send data from the PICAXE, via the ERF, and have that received by URF and displayed on the Terminal.

2) Send data from the Terminal, via the URF, and have it received by the ERF and read by the PICAXE using SERIN.

Then, do the same as (1) but with ERF driven from SERTXD rather than a SEROUT pin.
 

keith j

Member
Hi Hippy,

We are using a 28X1 chip, pins 6 & 7 serial in and out (as described in the manual) as programming pins. What pins do you recommend to use to connect the erf to for the tests above?

Regards

keith
 

hippy

Technical Support
Staff member
... anything but the Serial In and Serial Out download pins :)

Perhaps connect RX to digital Output 7 (leg 28) and TX to digital Input 4 (leg 14), top and bottom legs on the right of the 28X1 respectively so they are easy to identify. Then, for (1) ...

Code:
Do
  Pause 1000
  SerOut 7, Nxxxx, ("Hello ", #w0, CR, LF )
  w0 = w0 + 1
Loop
 

keith j

Member
Hi Hippy,

have tried this as suggested, get the error message cannot detect hardware, the tell-tale LED flashes briefly.

Regards

Keith
 

hippy

Technical Support
Staff member
Hi Hippy, have tried this as suggested, get the error message cannot detect hardware, the tell-tale LED flashes briefly.
You have to program those tests using a standard download cable (AXE027); you cannot program via URF/ERF.
 

keith j

Member
OK this time was better but getting a syntax error on line:

SerOut 7, Nxxxx, ("Hello ", #w0, CR, LF )

It doesn't like Nxxxx

Any suggestions?

Regards

Keith
 

BeanieBots

Moderator
Use the baud rate you have set on the ERF.
Nxxxx is the 'general' syntax.
You need to be specific eg "N9600_8"
where 9600 is YOUR baudrate and _8 is the speed of your PICAXE (eg 8Mhz)
 

keith j

Member
Ah I see, I thought it referred to the baud rate and tried 9600 and still got the syntax error, but did not know the speed of the picaxe had to be included! I am learning!

many thanks

Keith
 

hippy

Technical Support
Staff member
A loopback test was previously working so it is best going back to that to check that still works as per post #18. If that is working it should continue to work if the RX pin of the ERF is then moved from TX of the ERF module to the pin you are using to SEROUT of your PICAXE.

If that doesn't work it suggests either a wiring error, wrong pin, wrong baud rate or wrong polarity used in the SEROUT, but it could be something else. Post your code, circuit diagram and/or photograph of how you have wired things.
 

keith j

Member
Hi Hippy,

Have completed a loopback test again with success. It seems the fault must lay between the ERF, the interface circuit and the picaxe.

I Have checked the wiring (on the interface circuits between the erf & the AXE020 board) and may have found a fault. To absolutely eliminate this I am rewiring the entire interface (interface circuit as you sent me a while ago). As soon as completed and tested will be ready to check the next stage.

Will let you know when I have completed this and what the result is.

Regards

Keith
 
Top