Reworking an old FM radio to 2.4GHz er9x

Retro radio updates, hacking and mods
ReSt
Posts: 1581
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Reworking an old FM radio to 2.4GHz er9x

Post by ReSt »

When 9XR came up, HK offered its mainboard as spare part and I ordered one, hoping it would fit the 9X. Unlucky not, but by the time, I detected a display that fits this mainboard and the plan arose to use them with an old radio.

On an auction on eBay I got a radio, a "Model Craft FM-SS Profi 7/14", the same that I have used for a long time and that still is working, so I know about it's characteristics.
reworked and original radio
reworked and original radio
The original board is directly mounted on top (bottom) of the sticks and when the board and the battery are removed there is just enough space below the sticks to put the board in, that exactly fills the remaining space leaving room on top for the batteries.
Inside of reworked and original radio
Inside of reworked and original radio
Without the mounting board
Without the mounting board
The trim sliders use separate pots, independant from the stick pots. The stick pots are around 5kOhm and vary about 25% of the total value while the trim pots are about 9kOhm and vary about 33%. So they look like variable pots with series resistors to ground and +5Volt.
Connecting them directly in parallel gave a to big range for the trim pots, so I had to use some series resistor for the output of the trim sliders before these are connected to the stick sliders. This way, the range of the trim pot is around 25 to 30 % of the stick range.
Mounting board placed on top of the sticks
Mounting board placed on top of the sticks
I soldered most of the signal wires directly to the board.
directly soldered keys and sticks
directly soldered keys and sticks
Model setup menu
Model setup menu
Model display
Model display
As I do not need the digital trims, I now have 8 unused switch inputs (the original trim switches) that I could use as simple switches. But as far as I can see, trim switches can only be used as input to GVARS. 8 switches for 7 Gvars ?

The other option would be, use the trimm switches and use the analog trim sliders as analog sources.

Questions:

1. In Er9x, can trim switches be used for more than GVars ??

2. Is there a chance to have support for more than 7 analog inputs (e.g. 4 sticks, 2 pots and 4 sliders), maybe with the help of the (serial) voice module ?

Reinhard

User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Reworking an old FM radio to 2.4GHz er9x

Post by MikeB »

The 9XR mainboard does have some support for extra analog inputs. It includes an analog multiplexer. I'll need a bit of time to describe the connections, but the multiplexer is controlled by some of the unused signals (the ones we use to re-route the switches for telemetry), and there are some 0 ohm resistors that either put the battery voltage on an analog input or the multiplexer output.

Currently the trim switches are only used for the trim function, with the trim values available to control GVARs.
It is fairly easy to disable them from this function, and there is a possibility of adding them as sources to convert 2-pos switches into 3-pos switches, or as the PB1 and PB2 switches. Since you should have a '128 processor, extra code to handle this is possible, the biggest problem with adding extra switches is needing RAM space for the switch mapping.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
ReSt
Posts: 1581
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: Reworking an old FM radio to 2.4GHz er9x

Post by ReSt »

Thanks for this response, Mike.

Yes, the board has the M128a processor, so no problem with the flash space.
I do not have telemetry/FrSky with this radio as I'm using the original Flysky transmitter module and receivers.

It would be pretty cool to use the multiplexer to have some more analog sources.
In this case, I would add the trim keys and free the (analog) trim sliders as additional analog sources.

Thanks,
Reinhard


btw, thats not urgent, more a project of "what's possible to do with this hardware"
ReSt
Posts: 1581
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: Reworking an old FM radio to 2.4GHz er9x

Post by ReSt »

Now I have reworked the radio to the following:

I added trim switches for all sticks so that it uses the existing digital trim functions.

I separated the trim pots from the stick pots so that I have four analog sliders free to be used as separate analog sources.

The multiplexer chip 14051 by default has the selection inputs A,B,C already connected to the processor pins 42,41,35.
Input X0 is already connected to a voltage divider from battery voltage and input X2 is routed to J23.2

I wired my four trim sliders to the inputs X1, X2, X3, X4 and the output X of the multiplexer to J23.4, the original input from P3. As I don't have P3, this input was unused.

I connected 'Inhibit' (Pin6) and Vee (Pin7) to ground.

Software to do (Mike :mrgreen: ):
If the multiplexer is activated by the program, the four slider channels should be available on the original P3 channel.


Reinhard

I have no big problem to route the sliders or the output to different pins
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Reworking an old FM radio to 2.4GHz er9x

Post by MikeB »

There are two parts to such software changes.
1. The A2D driver that needs to control PC0, PC6 and PC7 to select the correct input and read the extra values. PC0, PC6 and PC7 must clearly not be used for anything else (like switch re-mapping for telemetry).
2. A way of allowing for extra analog inputs to be used in the mixer etc.

Ersky9x has some code for (2), as the X9E has extra analog inputs. This code maintains the internal coding for mix sources, while allowing the extra analog inputs to appear after the existing analog inputs, but before HALF and FULL etc.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

ReSt
Posts: 1581
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: Reworking an old FM radio to 2.4GHz er9x

Post by ReSt »

re 1:
Pins are only used as inputs to the multiplexer, no other connection.

If you can point me to where to look for that, I at least could try if I can get it running.
But I'm afraid, I will not, as I'm really no C++ programmer.

Reinhard
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Reworking an old FM radio to 2.4GHz er9x

Post by MikeB »

For 1, try extending the array:
s_anaFilt[]

to allow for 4 extra inputs, then change:
void getADC_osmp()
to something like

Code: Select all

for (uint8_t adc_input=0;adc_input<12;adc_input++){
  if ( adc_input > 8 )
  {
    // Set the multiplexor control signals to the required values
    // by setting PORTC outputs
    ADMUX=6|ADC_VREF_TYPE;  // Where the multiplexor output goes I think
  }
  else
  {
    ADMUX=adc_input|ADC_VREF_TYPE;
  }
Then try adding some lcd_outhex4() commands, perhaps in the DIAG ANA screen, to display the extra s_sanaFilt[] values to see they are being read.
Note: most of the code is just C really, only a few parts use C++ classes.

If this is then working, we can look at (2).

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
ReSt
Posts: 1581
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: Reworking an old FM radio to 2.4GHz er9x

Post by ReSt »

Thanks, I will see what I can do

Reinhard
ReSt
Posts: 1581
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: Reworking an old FM radio to 2.4GHz er9x

Post by ReSt »

What I did up to now
------------------------

First of all, I rely on the code of r818

in ER9X.cpp:
===========

replaced "uint16_t s_anaFilt[8]" with "uint16_t s_anaFilt[12]"

Code: Select all

void getADC_osmp()
.....
 
uint8_t mask, my_mask = 0;

// The selection pins are PC7, PC6, PC0 connected to inputs A, B, C of the 14051 IC 
// PC7 = A selects input X1 		(left vertical)
// PC6 = B selects input X2 		(left horizontal)
// PC6 & PC7 = A & B  select input X3 	(right vertical)
// PC0 = C selects input X4 		(right horizontal)

    DDRC |= 0xC1 ;			// make selection pins outputs

    for (uint8_t adc_input=0;adc_input<13;adc_input++){			// <13 ??
      if ( adc_input > 7 )						// >7  ??
       {
	mask++ ;			// counts 1,2,3,4,5,6,7,8......
	my_mask = (mask<<6) ;		// will be ==> 40,80,C0,00,40,.....
	if (mask>3) my_mask++ ;		// sets bit1 in addititon ==> 41,81,C1,01,41......

//      my_mask = 0x80 ;                // used for testing the adressing with a fixed selection

	PORTC &=0x3E ;			// switch off all three selection bits
	PORTC |=my_mask ;		// set ON any combination of the selection bits
	ADMUX = 6|ADC_VREF_TYPE
	}
       else
        ADMUX = adc_input|ADC_VREF_TYPE
------------------------------

in menus.cpp:
=============

Code: Select all

   .....
	case M_DIAGANA :
	......
	lcd_outhex4(7*FW,y,anaIn(i));
	if (i<4) lcd_outhex4(17*FW,y,anaIn(i+8));  //added Line to display the additional analog values.
When I try to use s_anaFilt[i+8] instead of anaIn(i+8) I get a compile error for this line with:
" 's_anaFilt' was not declared in this scope."

And I have no idea how to resolve that.

What I can see:
------------------
When I use hard coded single adresses for the multiplexor, I can select one slider after the other. Its analog value is available in the pot3 display (A7). And the value of the selected slider is displayed in all four 'new' display positions.

When I use the dynamically calculated adressing of the multiplexer, the pot3 display (A7) follows the movement of every slider.
All four displayed new values are similar, but not equal.
All four new display positions change with every single slider that is moved.
None of the four values is identical with the pot3 (A7) display.
(Can this be caused by the fact, that I display anaIn() and not s_anaFilt[] ?).

Reinhard

p.s. I will be off for the next week, so can not respond for that time :(
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Reworking an old FM radio to 2.4GHz er9x

Post by MikeB »

You can resolve the compile problem by adding:
extern uint16_t s_anaFilt[] ;
just before you reference it in menus.cpp.

You may find this slightly better as the multiplexor control outputs will only change once rather than changing to zero first then to the new value.
PORTC = (PORTC & 0x3E) | my_mask ;

You have declared s_anaFilt[] to be of size 12, so an index of 0 to 11, but your loop has adc_input going from 0 to 12, so you will overflow the array.
I think you need to check for <12 in the for statement.

It may be the multiplexor is slow to switch, so you might need a short delay after setting the multiplexor control bits before starting the ADC conversion.
getADC_osmp()
includes:
#if defined(CPUM128) || defined(CPUM2561)
asm(" rjmp 1f") ;
asm("1:") ;
asm(" rjmp 1f") ;
asm("1:") ;
#endif
which does give a small delay on those processors.

Mike.

Edit: Looking at a couple of datasheets for the 14051, the delay form control inputs to the output being correct, at 5V supply, could be as long as 720nS, or 12 clock cycles at 16 MHz.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
ReSt
Posts: 1581
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: Reworking an old FM radio to 2.4GHz er9x

Post by ReSt »

Thanks for the help.
I will try it as soon as I'm back to my radio (end of the week)

Reinhard
ReSt
Posts: 1581
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: Reworking an old FM radio to 2.4GHz er9x

Post by ReSt »

I'm back again now.

I didn't get really far, but

using s_anaFilt[] in the display routine now compiles ok.
if (i<4) lcd_outhex4(17*FW,y,s_anaFilt[i+8];


My findings:
============
I don't really see the values that I would expect.

When the selection of the 'slider to read' is done within the loop:
---------------------------------------------------------------------------

moving a slider changes two ore more (up to four) values at the same time
all displayed values are different
the range of variation is rather small
A7 value only changes with slider connected to X4, the slider, selected last, within the routine.
A7 varies from 2C0 - 518 (full range) while the slider displays vary e.g. 350 - 4A0 (limited range)

when instead of measuring, I hardcode s_anaFilt[8 to 11] at the final end of the routine, the values are correctly displayed.

When I hard code selection of a single channel by setting "Mask=x" (with x= any value of 1 to 4) I get the clear values of the selected slider shown in A7, and at the same time all four slider also display the identical value (full range).
When I add the line "PORTC = PORTC & 0x3E" at the final end of the "getADC_osmp()" routine to deselect the used channel (or exactly, select input x0 of the multiplexer that has the hard wired battery monitoring signal) then random values are displayed again.

It nearly looks as if that slider that is adressed last, is measured somewhere else

Adding the additional delay, even multiples of it, did not change anything.

Reinhard
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Reworking an old FM radio to 2.4GHz er9x

Post by MikeB »

Not sure if we have checked this. The default on the board is to connect the battery sense voltage to PORTF bit 7 via (I think) R27. To use the output of the multiplexor, this needs to be removed and R73 (I think) fitted instead (same value, 200 ohm).

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
ReSt
Posts: 1581
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: Reworking an old FM radio to 2.4GHz er9x

Post by ReSt »

Mike, that battery sensor input to the multiplexor makes no problem. It's connected to the input X0 of the multiplexor. I don't need it, as battery voltage is displayed correctly. It's simply the reason why I use inputs X1 to X4 for the sliders instead of X0 to X3.

Reinhard
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Reworking an old FM radio to 2.4GHz er9x

Post by MikeB »

The problem is the battery sensor is ALSO connected directly to PORTF bit 7 (via R27). The multiplexor output is connected to PORTF bit 7 via R73. To use the multiplexor you have to disconnect the battery sensor from PORTF bit 7, and read the battery using the X0 input of the multiplexor. If you haven't removed R27, then the multiplexor output is being connected the the battery sensor. This is fine when X0 is selected as they are the same voltage, but all the other multiplexor inputs (X1 to X4) will not read correctly.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
ReSt
Posts: 1581
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: Reworking an old FM radio to 2.4GHz er9x

Post by ReSt »

It looks like there are some small differences in the boards.
R73 and its capacitor are missing on my board, so the multiplexor output is not connected with the processor.
As said before, I have routed the multiplexor output via the Pot3 signal.

I took my scope and looked at the output signal of the multiplexor
It looked like heavily capacitve loaded.
Output signal of the multiplexor with 0.5V/Div.
Output signal of the multiplexor with 0.5V/Div.
I removed capacitor C26 and thats quite another story.
Output signal of the multiplexor wit capacitor C26 removed
Output signal of the multiplexor wit capacitor C26 removed
All four sliders are now displayed without any influence of one to another
The analog voltage range of the sliders is about 2.5 volts and the digital values of the sliders go from 292 - 532, 2B8 - 552, 2BE - 51A and 2C7 - 54D

I think point one is working now. :D

Reinhard
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Reworking an old FM radio to 2.4GHz er9x

Post by MikeB »

Good!
You might want to add capacitors on each of the new analog signals before the multiplexor.
I believe the idea is only one of R27 or R73 should be fitted. If you remove R27 and fit R73, the the multiplexor output is read where the battery voltage would be read. Since the battery voltage is the X0 input to the multiplexor, this should work OK.

I'll need to look through the ersky9x code to see what I did regarding extra analog inputs now!.

If you want to look for yourself, the ersky9x code uses a #define of:
NUM_EXTRA_POTS
to handle extra analog inputs. You might be able to copy and paste the code enabled by this.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
ReSt
Posts: 1581
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: Reworking an old FM radio to 2.4GHz er9x

Post by ReSt »

Will hold the idea with the capacitors in my mind. As the sliders are connected via small strip boards, that would be the place to fit them.
re the battery voltage. It is read as it is and I do not use the X0 input of the multiplexor. If there is no real reason behind to change it, I will leave it as it is now.

I will download the ERSKY code and see what I can do with it.

Reinhard
ReSt
Posts: 1581
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: Reworking an old FM radio to 2.4GHz er9x

Post by ReSt »

I have added the NUM_EXTRA_POTS code from ersky9x.cpp/.h and menus.cpp as good as i was able to do.
I modified/added some defines in er9x.h but I'm not sure about the values I defined.
It compiles with no error.

The only change that I can see now is, in the mixer source there are some additional selections between P3 and HALF (----, A1, A2, RSSI, I assume there should be the new four 'sliders') and I can step beyond the scaler4.

Stepping beyond scaler4 I get about two lines of characters of a fat font, overlaying the menu data. And in the area where I expect some sequence number (while stepping through) there is the number 9 to 17 displayed.
I dont know what to expect there and neither where this mixer code is located.

The defines I added are:

#define EXTRA_POTS_POSITION 8
#define NUM_EXTRA_POTS 4
#define EXTRA_POTS_START 120
#define NUMBER_ANALOG 7
extern int16_t calibratedStick[NUM_EXTRA_POTS+NUMBER_ANALOG];

Whereever names with "SKY" in the name where used in ersk9x I removed the "SKY" from the name to confirm with the ER9x names like NUM_SKYXCHNRAW --> NUM_XCHNRAW


Reinhard
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Reworking an old FM radio to 2.4GHz er9x

Post by MikeB »

In:
void putsChnRaw(uint8_t x,uint8_t y,uint8_t idx,uint8_t att)
at the end you need something like this:

Code: Select all

#ifdef FRSKY
		else if(idx < EXTRA_POTS_START)
		{
			if ( mix )
			{
				idx += TEL_ITEM_SC1-(chanLimit-NUM_XCHNRAW) ;
			}
  	  lcd_putsAttIdx(x,y,Str_telemItems,(idx-NUM_XCHNRAW),att);
		}
#endif
#if NUM_EXTRA_POTS
	else
	{
  	lcd_putsAttIdx(x,y,PSTR(STR_EXTRA_SOURCE),(idx-EXTRA_POTS_START),att);
	}
#endif	// NUM_EXTRA_POTS
with:
#define STR_EXTRA_SOURCE "\003AN1AN2AN3AN4"
or whatever 3 character names you want to use.

er9x only has 4 scalers while ersky9x has 8. You may have picked up an 8 somewhere that now needs to be 4 to prevent falling off the end of the list after SC4.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
ReSt
Posts: 1581
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: Reworking an old FM radio to 2.4GHz er9x

Post by ReSt »

I'm afraid, my radio died. :(

Display of the names for the sliders already worked and it did stop at Scaler4.

But when I used the new sliders as source for a channel, it did not show up in the channel display. Channels following the new sliders still worked.

When I flashed another version to the radio and tested it, all of a sudden, the backlight flashed some times (on/off) and then stayed off. And the display showed a full black screen, every pixel black.

After Power off/on, the splash screen came up shortly and then the black screen again. But according to the beeper, the keys seemed to work. severeal retrys and a fresh download didn't change a thing.
I flashed an older version and eeprom and then the radio seemed to work again, except the backlight. This really died (but can live with it for the moment).
As the radio was working again (without backlight) I reflashed my latest version and it seemes to work so far. Except the sliders mixed to a channel.
Later I found, that in the DiagAna the sliders do no longer work.
The probable reason, all three selection signals (A,B,C) of the multiplexor are permanently high. Even if I hardcode only one single channel (1-4 or even 0) to be selected, all signals are permanently high.
I tried with a pulldown resistor of 1k to the signals and that brings them down from +5 Volt to +1 Volt.
So the pins are not just set up as inputs with active pullup (that should go lower) and also not really active high driven outputs (as that should drive a 1k load to more than +1 Volt).

It's strange, that exactly the three signals should have died, but that's what it looks like to me.

I can replace the processor, as I have two spares. But that means, I will have to desolder all wires from the sticks and switches and programmer to remove the board from the radio. That may take some time.

If you have any better idea, please provide it.

Reinhard
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Reworking an old FM radio to 2.4GHz er9x

Post by jhsa »

:(

I know this might sound stupid but.... Fuses??

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
ReSt
Posts: 1581
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: Reworking an old FM radio to 2.4GHz er9x

Post by ReSt »

Probably no as the rest of the radio (the complet menu system) works.

Reinhard
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Reworking an old FM radio to 2.4GHz er9x

Post by MikeB »

It seems very odd, those three signals are only connected to the multiplexor. So, before changing the processor, I'd check the multiplexor. If, for example, the multiplexor as lost its ground connection then the multiplexor could pull all three signals high through the chip protection diodes. So, check all the connections to the multiplexor, and you could also try lifting one of the pins (9, 10, 11).
Another check, look at pin 7 of the multiplexor, this is VEE and should be connected to ground (or analog ground). From the circuit I have, it may not be connected at all!

Mike.

Edit: Just checked on my 9XR mainboard, pin 7 seems to be open circuit. Try connecting it to pin 8.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
ReSt
Posts: 1581
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: Reworking an old FM radio to 2.4GHz er9x

Post by ReSt »

Ground and +5V are ok on the Multiplexor and pins 6,7,8 are solder connected with a wire to ground (Pin8).
Wll see if I can lift pin9

Reinhard
ReSt
Posts: 1581
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: Reworking an old FM radio to 2.4GHz er9x

Post by ReSt »

Lifted pin9 of 14051
Floating input pin 9 has 2.8 Volt, with 1k pulldown to ground -> 0V
Output pin from cpu has 5 Volt, with 1k pulldown to ground -> 1V
Still no pulses on the signal lines from the cpu.

It really seems to be the cpu.

Reinhard
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Reworking an old FM radio to 2.4GHz er9x

Post by MikeB »

Could be worth configuring the pins as inputs, with a pullup, and seeing if they are still stuck at 5V.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
ReSt
Posts: 1581
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: Reworking an old FM radio to 2.4GHz er9x

Post by ReSt »

modified the getADC_osmp() routine:

DDRC &= 0xC1 // make pins 0,6,7 input
PORTC = (PORTC | 0xC1) // write ones to activate pullups

disabled the part that should measure the multiplexer by changing
"if (adc_input >7)" to "if (adc_input >12) " That condition should never be true

Conditions on the signals are unchanged, still +5V on the processor outputs, that drop to +1v with the 1k pulldown

How could I display the port data in the DIAGANA menue to test if adding the pulldown to an input is recognized by the processor ?

Reinhard

noticed that the "DDRC &= 0xC1" is incorrect
Just trying with "DDRC &= 0x6E "

Result is the same
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Reworking an old FM radio to 2.4GHz er9x

Post by MikeB »

I usually just put in a call to lcd_outhex4( x, y, PINC ), and choose x and y to be somewhere currently blank. The top line at the right should do, so try lcd_outhex4( 100, 0, PINC ).
The datasheet for the '128 says the maximum voltage guaranteed to be recognised as a '0' is 0.2VCC, so 1 volt.

I usually use ~0xC1 rather than 0x6E, so the text is the same, and it also works well for 16 and 32 bit values so you don't need to remember to put in a lot of 'F's (for 32bits, ~0xC1 is 0xFFFFFF6E).

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
ReSt
Posts: 1581
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: Reworking an old FM radio to 2.4GHz er9x

Post by ReSt »

Part of the problem was sitting in front of the screen :cry:

Back to the point before the black display and the dead backlight happened.

When I flashed the radio with an older version I changed the path in eePe and forgot to change it back to my actual directory. As the directory name and the content of the two directories are rather similar, I did not notice it and therefore I always reflashed the same older fw and not the one I just compiled for debugging. (And possibly, Pin7 of the multiplexer was not really nicely soldered to the grounding wire.)
No wonder that the results did not change.

But now, I'm 'online' again.

Processor and Multiplexer DO work! :!:

The DIAGANA menu shows all four slider values correctly changing when the sliders are moved.
In the source field of the MIXER menu I get my new four sliders displayed as SLH, SLV, SRH, SRV
(Slider Left/Right Horizontal/Vertical)
The sources following the sliders (HALF, FULL, ... CH1,..) are correctly mixed when used as source for a channel (no incorrect displacement).

But in the channel display the sliders don't show, or they show up with incorrect values.
In the channel with mix SliderLeftVertical, Pot P2 is shown somhow. (When moving the pot, the displayed value jumps very fast between +100 and -100)
In the channel with mix SliderLeftHorizontal, the RUD stick affects the shown value.
The other two sliders don't show anything (0).
----------------

Regarding the black screen, there is some incompatibility between eePe and my eeprom structure. Therefore I can not modify a saved eeprom with eePe and load it back to the radio. I only can reload untouched files. When I load a certain eeprom backup, the screen of the radio goes black.

And on the other side, even when I recreate the eeprom after an invalid eprom format message, in the moment there is an annoying problem. I can reproduce empty screens. (I certainly made some errors when trying to copy the modifications for the additional analog sources, but it's rather hard for me to find without some help).

After loading an eeProm file, I setup the radio, stepping through all of the setup screens. First of all I set the battery warning limit and calibrate the battery voltage. Later on when I try to calibrate the analog inputs, I see, that the sticks do not move the full range of the stick display. And when I press the menu button to set the range of the sticks, an alarm starts to sound. I finish the calibration procedure and when I check the battery value (DIAGANA), it changed from 7.8 Volt to something like 8.3 volt and in the alarms menu the low voltage warnig changed from 7.1volt to 4.0volt. I can readjust the values and the alarm goes off (?), but when I select the DISPLAY menu (with or without adjusting the voltage/voltage level), I get a blank screen. Forever.

According to the beeper, the keys do work, but the display never comes back;power off/on doesn't help; until I reload the eeprom.

The only thing that I could do in the moment is, restart with the unmodified fw, reapply the modifications and see, if it's going better with the changes.

Reinhard

Post Reply

Return to “Retro Radios”