HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Jul 26, 2011, 02:49 PM
MelihK's Avatar
United Kingdom, England, Canterbury
Joined May 2008
1,366 Posts
Quote:
Originally Posted by Cyb View Post
Hi MelihK,
Would you mind sharing your code ?

Cyb,
Here is the code. I wrote it with AVR-GCC but please don't ask the details because it was 1.5 years before. You can see very primitive comments because it wasn't opensource project.

Code:
#include <string.h>
#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/wdt.h>
#include <util/delay.h>
#include <avr/eeprom.h> 


unsigned char	packs[40] ;
unsigned char   pack_number = 0;
unsigned char   i;

unsigned char rssi=0;

volatile unsigned char c;
volatile unsigned int say = 0;
volatile unsigned char temp;
volatile unsigned char indicator_mode=0;

#define ppm_on PORTB |= (1<<1)
#define ppm_off PORTB &= 0xFD

#define led_on PORTC |= (1<<1) 
#define led_off PORTC &= 0xFD

#define indicator_on PORTB |= (1<<1) 
#define indicator_off PORTB &= 0xFD

#define NOP(){asm volatile("nop\n\t");}


#if (defined UCSR0A)  //Atmega48 ise
 #define  UCSRA         UCSR0A
 #define  UCSRB         UCSR0B
 #define  UCSRC         UCSR0C
 #define  UBRRL         UBRR0L
 #define  UBRRH         UBRR0H
 #define  UDR           UDR0
 #define  TXC			TXC0
 #define  RXC			RXC0
 #define  WDTCR         WDTCSR
 #define  GICR         	GICSR
 #define  RXEN 			RXEN0
 #define  RXCIE 		RXCIE0
#endif



static void hardwareInit(void)
{

	DDRC = 0x03;                /* all outputs */
	PORTC = 0x00;

      
	DDRB = 0x06;
	PORTB = 0x00;
   
   
    UCSRA = (1<<U2X0);
	UCSRB = (1<<RXEN);   // Rx enable Tx Enable
	UCSRC = 0x86;   // Asyn,NoParity,1StopBit,8Bit	

	UCSRB |= (1<<RXCIE); // Enable Rx Complete Interrupt


	UBRRL = 8; //7; // 115.200 baud
	UBRRH = 0; 

	
}


void init_servo_driver(void)
{

   TCCR1A |= (1<<COM1B1);         //clear on compare match, set at bottom
   TCCR1A |= (1<<WGM11);                  //fast pwm, ICR1 is TOP
   TCCR1B |= (1<<WGM12) | (1<<WGM13);

   ICR1 = 120;

   TCCR1B |= (1<<CS10);                  //prescaler = 1

   OCR1B = 0;
  
  
} 




#ifdef UCSR0A 
ISR(USART_RX_vect)
#else
SIGNAL (SIG_UART_RECV)  // USART RX interrupt
#endif	
{	
	
	c = UDR;
	
	if (say>5)
	   {
	   packs[pack_number] = c;
	   pack_number++;
	   if (pack_number>39) pack_number = 0;
	   
	   temp = c ;
	   
	   if ((temp & 0x0C) != 0)	
			{
			led_off;
			indicator_mode = 0;
			}
			else
			{
			led_on;
			indicator_mode = 1;
			
			}

	   }
		
	say = 0;

	
}



int main(void){


wdt_enable(WDTO_1S);
hardwareInit();


_delay_ms(100);
led_off;
_delay_ms(100);
wdt_reset();
led_on;
_delay_ms(100);
led_off;
_delay_ms(100);
wdt_reset();
led_on;
_delay_ms(100);
led_off;
_delay_ms(100);
wdt_reset();

init_servo_driver();
sei();
	
led_off;
indicator_off; 



    for(;;){    /* main event loop */
	
	     
	say++;
	
	if (indicator_mode==1) 
		{
		indicator_on;
		_delay_us(500);
		indicator_off;
		_delay_us(500);
	    }
		else
		{
		indicator_off;
		_delay_ms(1);
	    }
	
	
	rssi = 0;
	
	for(i=0;i<40;i++) {
	    
	    temp = packs[i] ;
		if ((temp & 0x0C) != 0) rssi = rssi + 3 ;
		}

	OCR1B = rssi;
	
    wdt_reset();
		
	
	}
    return 0;
}
MelihK is offline Find More Posts by MelihK
Site Sponsor
Reply With Quote
Sign up now
to remove ads between posts
Old Jul 30, 2011, 11:21 AM
Cyb
Registered User
Belgium
Joined Sep 2003
118 Posts
Hi,

I managed to do it using a PIC that I got as free sample (16f1825) . Here's a video showing the current status using the Remzibi OSD :
Spektrum RSSI (0 min 48 sec)



For now I'm just checking the number of frames read by second. Expected +-45. Now I need to test it in flight and maybe make it more smart
Cyb is offline Find More Posts by Cyb
Last edited by Cyb; Jul 30, 2011 at 12:40 PM.
Reply With Quote
Old Jan 03, 2012, 12:29 PM
I think it'll work this time!!
Chairwolf's Avatar
399 feet above Roanoke, VA
Joined Jan 2007
3,461 Posts
Melihk, any idea when these will be back in stock at Flytron?

Thanks,

Bob
Chairwolf is offline Find More Posts by Chairwolf
Reply With Quote
Old Jan 05, 2012, 07:37 PM
My RC builds in my profile.
daign's Avatar
United States, CA, Los Angeles
Joined Feb 2011
2,569 Posts
for spektrum users Eagletree makes a simple cable that plugs into the RPM port for RSSI.
daign is offline Find More Posts by daign
Reply With Quote
Old Jan 05, 2012, 09:06 PM
I think it'll work this time!!
Chairwolf's Avatar
399 feet above Roanoke, VA
Joined Jan 2007
3,461 Posts
Quote:
Originally Posted by daign View Post
for spektrum users Eagletree makes a simple cable that plugs into the RPM port for RSSI.
Thanks. Do you have a link? I can't find it on Eagletree's website.
Chairwolf is offline Find More Posts by Chairwolf
Reply With Quote
Old Apr 16, 2012, 11:05 AM
Registered User
United States, NJ, Millburn
Joined Sep 2011
102 Posts
Is the development for this device done for? I'd love to interface my Spektrum AR9000 with my EZOSD. I know there's no RSSI pin on the receiver, and this thing looks out of stock.

Maybe a way to hack the spektrum flight log device and convert to RSSI? So desperate to get signal strength on EZOSD that I'm half debating taking the flight log LCD out of it, and putting in front of FPV cam as poor-man RSSI OSD.
ov3rmind is offline Find More Posts by ov3rmind
Reply With Quote
Old Apr 16, 2012, 11:54 AM
Registered User
Joined Mar 2007
80 Posts
yes, "done", and discontinued after people purchased non-working devices ! -loke I did.
AlCapone is offline Find More Posts by AlCapone
Reply With Quote
Old Jul 15, 2012, 04:08 PM
Registered User
Joined Jan 2012
42 Posts
Just purchased this one but do not know if it works (yet): http://www.ebay.com/itm/DORA-transla...item4ab9d03128
Jack2010 is offline Find More Posts by Jack2010
Reply With Quote
Old Jul 18, 2012, 04:24 PM
Registered User
Thint1's Avatar
Austria / Vienna
Joined Feb 2007
1,309 Posts
Working RSSI for Spektrum DSMX :)

Quote:
Originally Posted by Jack2010 View Post
Just purchased this one but do not know if it works (yet): http://www.ebay.com/itm/DORA-transla...item4ab9d03128
Hi to all,

after my personal desaster - pay money for a non-working unit - iīm able to show rssi on my eagle tree osd
the display shows 100% when the rx/tx are near together and 0% at the moment the failsafe is activated.
the unit i use is called "DORA" and is available on ebay from "kraehe2007"
this unit works with all new receivers "DSMX" even in DSM2-mode.
on my eagle tree system the installation was very easy, just activate the display in the osd and rerun the rc-wizzard to teach the osd which voltages are for tx on or off. to make a scale from 0 to 100%.
thre is a potentiometer on the unit to adjust the output voltage to osdīs with different maximum voltages, like ezosd.

cheers Thomas
Thint1 is offline Find More Posts by Thint1
Reply With Quote
Old Jul 25, 2012, 04:43 PM
Registered User
Joined Jan 2012
42 Posts
DORA tests

It is working

So far only bench tests with AR7000 DSM2. Upper right corner shows how RSSI reacts while switching on and off the DX8 TX.

DORA Spektrum RSSI (1 min 16 sec)
Jack2010 is offline Find More Posts by Jack2010
Reply With Quote
Old Jul 29, 2012, 02:20 PM
Certified Propellerhead
Copenhagen, Denmark
Joined Mar 2001
318 Posts
For the DIY people, I am working on a small AVR based unit. I made it for a slightly different purpose (post-flight radio link quality analysis), but it was easy to throw in a live RSSI-like analog output as well. Here is my prototype hooked up to an Eagle Tree OSD:

Spektrum RSSI test (0 min 52 sec)


For further information, schematic, and when I am done also the sourcecode for the AVR, please visit this thread:

http://www.rcgroups.com/forums/showt...3#post22283786
Mikael Pedersen is offline Find More Posts by Mikael Pedersen
Last edited by Mikael Pedersen; Jul 30, 2012 at 08:33 AM. Reason: Changed video
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
New Product New FLYTRON DT-3K Hybrid Headtracker for Futaba / HITEC / ESky Transmitters MelihK FPV Talk 594 Aug 03, 2014 12:06 AM
Discussion Bad news for Lipo users hydromaddicted Batteries and Chargers 32 Mar 14, 2010 09:19 PM
Wanted Trade nib Spectrum 7000 for 2 Spectrum 6100E tkoguy Aircraft - General - Radio Equipment (FS/W) 2 Mar 13, 2010 12:34 PM
Help! Looking for Nomadio Sensor 2.0 Users Manual kegresse Motorcycles 5 Mar 07, 2010 09:18 PM