HAC-UM96

Hi

I have been trying to experiment with HAC-UM96 with AT89C51 chip to transmit simple data across to another simliar device with HAC-UM96.

There are few things that I need to be sure before testing it.

I am not 100 percent where I can connect SNG to?

Should I connect it to GND? :oops:

Please advise me

Thank you

Waveman

So far I put the short circuiter in the E socket in the jumper in order to implement no parity (8N1). The rest of socket (ABCD) are without short circuiter.

Here is my simple testing code for Transmitter

******************************************************************************/ 

// header files
#include "main.h"
#include "port.h"
#include "delay_loop.h"

//Function Prototypes

void serial_init();
void send_serial(unsigned char *s);


void serial_init()
{
	SCON=0x50;		//Setup for 8-bit data
	TMOD=0x20;		//Setup timer 1 for auto-reload
	TH1=0xF9;		//Setup for 9600 Baud
	TR1=1;			//Turn on timer 1
	TI=1;			//Indicate ready to transmit
}

void send_serial(unsigned char *s)
{
	while(*s !=0x00)
	{
		SBUF=*s;
		while(! TI)
		{

		}
		TI=0;

		s++;
	}
}


void main(void)
{

serial_init();
BLUE_LED=OFF;
Delay_Loop(100);
BLUE_LED=ON;
Delay_Loop(100);
BLUE_LED=OFF;

Delay_Loop(100);
BLUE_LED=ON;
Delay_Loop(50); 
send_serial('5');
BLUE_LED=OFF;
	


}

//*****************************************************************************

Receiver code

******************************************************************************/ 

// header files
#include "main.h"
#include "port.h"
#include "delay_loop.h"

//Global variable
tByte received_data_G;
int received_flag_G;

//Function Prototypes

void serial_init();	  

void serial_init()
{
	SCON=0x50;		//Setup for 8-bit data
	TMOD=0x20;		//Setup timer 1 for auto-reload
	TH1=0xF9;		//Setup for 9600 Baud
	TR1=1;			//Turn on timer 1
	TI=1;			//Indicate ready to transmit
	EA=1;			//Enable Interrupts
	ES=1;			//Enable serial port interrupt
}

serial() interrupt 4
{
	if(RI)
	{
		received_data_G=SBUF;
		RI=0;
		received_flag_G=1;		//Set received flag
	}
}


void main(void)
{
RED_LED=OFF;
Delay_Loop(100);
RED_LED=ON;
Delay_Loop(100);
RED_LED=OFF;

received_flag_G=0;
serial_init();


	for(;;)
	{

		while(received_flag_G==0)
		{

		}

		received_flag_G=0;

		if (received_data_G==5)
		{
			RED_LED=ON;
			Delay_Loop(50);
			RED_LED=OFF;
		}

	}
}

//*****************************************************************************

Since I have connected the SGND to the GND and I tested it. What I got - Nothing! Spot any mistake?

Oh one more thing…i left RESET and SLEEP unconnected as I don’t need them for the moment.

Waveman

Hey Waveman,

When you power up the UM96 it should report back the string:

UM96v01

or something similar. Are you seeing any serial characters when you power them up?

-Nathan

sparky:
Hey Waveman,

When you power up the UM96 it should report back the string:

UM96v01

or something similar. Are you seeing any serial characters when you power them up?

-Nathan

How earth I get the message ‘UM96v01’? Unless you mean that I should check string on hyperterminal after powering my UM96?

Waveman

You can use your micro (whatever you are attaching the UM96 to) or you can attach it to a computer through an RS232 conversion circuit. The UM96 can also be attached directly to a computer’s RS232 port via port two on the modem.

-Nathan

I will give it a try tomorrow morning…

Thank you for giving me tip

Waveman

I too am having problems using this device to transfer data from one similar device to another. I am using an ATMEGA 16 and created another thread about this problem I am desperately wanting to solve this problem or needing to find a wireless module that will do what I need by mid-week. One thing that you might have if you are going to use this device is lag time since you are trying to use a micro processor to send data to a micro to a wireless module.

Are you trying to send ASCII or binary data?

I noticed that mine would not talk when I was trying to send non-ASCII data (Trimble binary protocol) but worked fine with NMEA (ASCII) strings.

In both cases the comms configurations were set correctly so it wasn’t a mis-match.

The ASCII link is all I need for now but I will do some more tests to see if perhaps the modems are responding to XON/XOFF or something stupid.

I am trying to send an 8 bit char. I still can’t get that to work. I don’t even think I am getting any tranmission from these things. I know data is getting to the wireless module I can trace it in there with a scope. When I have a spectrum analyzer hooked up I don’t even see a spike at 420 MHz. I don’t know what is going on. I called for some assistance they asked if I was getting the output from the moduleu "M96V10 " I am getting that I just praying that there is some simple solution to this. At this time any ideas are welcome.

Setup:

Reset - hi

sleep - lo

E - shorted

The micros I am using are configured at 9600 baud and non-parity

Hi everyone

You are right about string that displays on my screen after connecting to the power.

So far I managed to send data from my transmitter to receiver and it works (I was over the moon!!!) BUT I was expecting to see 5 appears on my screen. Unfortunately 5 didn’t turn up but different character. (Please be aware that receiver compare the incoming character wiith 0x35. If it is true, Blue led switch on and off otherwise Red Led switch on and off.)

I do not know why this happen but I suspect it must be relate to my baud rate and crystal oscillator because at the moment I am using 12MHz and 9600 Baud Rate with 8N1 therefore the error would be about 7 percent.

So I believe that 11.095MHz may remove this problem. I am going to order 4 11.059MHz crystal oscillators asap

Unless it is nothing to do with the crystal oscillator but who know!

Waveman :frowning:

waveman:
Hi everyone

You are right about string that displays on my screen after connecting to the power.

So far I managed to send data from my transmitter to receiver and it works (I was over the moon!!!) BUT I was expecting to see 5 appears on my screen. Unfortunately 5 didn’t turn up but different character. (Please be aware that receiver compare the incoming character wiith 0x35. If it is true, Blue led switch on and off otherwise Red Led switch on and off.)

I do not know why this happen but I suspect it must be relate to my baud rate and crystal oscillator because at the moment I am using 12MHz and 9600 Baud Rate with 8N1 therefore the error would be about 7 percent.

So I believe that 11.095MHz may remove this problem. I am going to order 4 11.059MHz crystal oscillators asap

Unless it is nothing to do with the crystal oscillator but who know!

Waveman :frowning:

I've heard that you should have approximately +/- 2% error or less, so your 7% error is probabaly the cause of your problems.

Thank you NleahciM.

I thought 11.059MHz would eliminate error leaving zero percent.

I will buy 11.059MHz crystal oscillator asap but I have to wait for them for bloody within two weeks!! Groan

Nathan, do you sell 11.059MHz crystal oscillator from your e-shop?

Waveman

While I wait for 11.059MHz to be delivered, I decided to test the serial communication between two AT89C51s via wire. To my surprise, it works like a beauty.

Now it makes me think the crystal oscillator MAY be the culprit but I am not 100 percent certain!

Waveman

Hi

Here is my connection to HAC-UM96.

UM96 My circuit

GND GND

Vcc +5V

TXD RXD (AT89C51)

RXD TXD (AT89C51)

ATXD Unconnected (Don’t need it at this stage)

BTXD Unconnected (Don’t need it at this stage)

SLEEP Connected to ground (Don’t need it at this stage)

RESET Connected to ground (Don’t need it at this stage)

Are these connection right place?

Waveman

I am having similiar problems as waveman.

GND GND

Vcc +5V

TXD RXD (PIC16F877)

RXD TXD (PIV16F877)

ATXD Unconnected (Don’t need it at this stage)

BTXD Unconnected (Don’t need it at this stage)

SLEEP Connected to ground (Don’t need it at this stage)

RESET Connected to +5v OR ground (Don’t need it at this stage

Tried the reset pin connected to ground and +5v

Jumper pin E is shorted.

When I connect the pics together with a cable everything works fine.

When I connect the UM96, I can see comms but not what I am sending.

At the moment I send the digits 2 to 8 in ascii from one pic to the other.

Every time 8 is sent I get a character that looks like a w.

This happens everytime 8 is transmitted.

It the only character that is displayed.

Samncw

Welcome to my club!

At the moment, I am waiting for 11.059MHz crystal oscillator to be delivered as I have just ordered few days ago. In my theory, I reckon it must relate to my crystal oscillator due to high error. So I am hoping to solve this problem out very soon.

Are you using the correct crystal oscillator and baud rate setting?

Waveman

Hi there

According to the PIC data sheets the percentage error that I should have with my settings are 0.16%.

Because the comms is very good with the wired link, this is probably right.

9600,8,n,1.

samncw

Hi there,

Managed to do some more work with the um96.

I conected com2 port of each um96 with a com port of a PC.

D and E jumpers were shorted.

Using Hyperterminal set at

9600,N,8,1 and no control.

The comms between each PC were perfect.

Whatever I typed on one PC showed up on the other

and visa versa.

I would be surprised if the problem that we have when com 1 is used on both modules is clock related.

Samncw

Hi - as long as we’re on the topic of this module - I have a couple questions regarding it:

  1. Is the SLEEP’ function disabled or enabled? In the provided datasheet it is stated that it is normally disabled unless specially requested by the purchaser (sparkfun), so I’m assuming it’s disabled, though personally I would prefer it enabled.

  2. What kind of connector is used on the board for the data cable? I cannot find any reference to its model number and I don’t recognize it.

  3. what kind of connector is the RF connector?

  4. For best performance, how should the two antennas be oriented towards each other? I’m assuming parallel, but I’m a bit clueless when it comes to RF stuff.

  5. does the performance improve at all with an increased supply voltage? It says it can take 3.3-5.5V. My system is running at 3.3V so I’m inclined to give it that, but I also have +5V available so if better performance would be achieved with a 5V supply I would not mind adding the level converters to interface to it.

Some food for thought:

We’ve had one unit returned that was an incorrectly labeled UM96. UM is the type. 12 is 1200bps, 96 is 9600bps. This problem unit was labeled UM96 but was actually programmed for 1200bps. The way we discovered this was by attaching the unit to a computer and setting the ports to 9600bps. When garbage was spit out when it should have been the ‘UM96 v1.0…’ boot string, we tried the other bauds. 1200bps is the long range version (soon to be available).

If you are getting the correct response string, everything should be good. If you have any doubts, we can test them for you.

-Nathan