flashing latest er9x
Re: flashing latest er9x
Hi everyone,
I've built a M128 board from scratch using serial LCD (http://www.hobbyking.com/hobbyking/stor ... K2_1_.html) with 'Multiprotocol TX' and having problem compiling MBTx to use left vertical trims as per original board (voice module NOT installed).The obvious 'fix' is to use PC0/PC4 for the trim inputs, however PC4 is already used for serial LCD clock line.
Can anyone point me to a compiling options file? Any help appreciated.
I've built a M128 board from scratch using serial LCD (http://www.hobbyking.com/hobbyking/stor ... K2_1_.html) with 'Multiprotocol TX' and having problem compiling MBTx to use left vertical trims as per original board (voice module NOT installed).The obvious 'fix' is to use PC0/PC4 for the trim inputs, however PC4 is already used for serial LCD clock line.
Can anyone point me to a compiling options file? Any help appreciated.
- MikeB
- 9x Developer
- Posts: 17993
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: flashing latest er9x
If you are getting a file mbtx.hex, then you are compiling for er9x V2. This is still in development, better, for now, to compile V1.
I suggest you do a "make clean", then do "make CPU=128 EXT=FRSKY". You may need to add extra options to get the serial LCD, I'm not sure what as I didn't add that code.This will build the standard er9x for the M128 processor.
If you don't have a voice module, then simply don't set the "Sound Mode" to "Megasound" (AudioHaptic menu), and make sure "M'Sound Serial" is set to OFF in the hardware menu. Then the left vertical trims work as per the original hardware.
Note that recent code disables the hardware menu by default. To enable it just hold the left horizontal trim to the left as you power on.
Mike.
I suggest you do a "make clean", then do "make CPU=128 EXT=FRSKY". You may need to add extra options to get the serial LCD, I'm not sure what as I didn't add that code.This will build the standard er9x for the M128 processor.
If you don't have a voice module, then simply don't set the "Sound Mode" to "Megasound" (AudioHaptic menu), and make sure "M'Sound Serial" is set to OFF in the hardware menu. Then the left vertical trims work as per the original hardware.
Note that recent code disables the hardware menu by default. To enable it just hold the left horizontal trim to the left as you power on.
Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
Re: flashing latest er9x
Mike,
I could not enable hardware menu on the radio by holding left trim to the left during power-up, but I could disable MegaSoundSerial in eePe and after re-flashing the EEPROM the trims work as expected.
Thanks again
I could not enable hardware menu on the radio by holding left trim to the left during power-up, but I could disable MegaSoundSerial in eePe and after re-flashing the EEPROM the trims work as expected.
Thanks again
- MikeB
- 9x Developer
- Posts: 17993
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: flashing latest er9x
I assume you downloaded the source code from Github. Did you download from the "master" branch or the "next" branch?
Mike.
Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
Re: flashing latest er9x
yes, I have downloaded both master and next from Github. I've compiled and tested both. Neither has offered the hardware menu (or better, I could not find it in the radio setup menus). I have previously "Set fuses to protect EEprom" in eePe, perhaps that is the reason for the behavior.
- MikeB
- 9x Developer
- Posts: 17993
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: flashing latest er9x
The hardware menu isn't in the M64-FrSky version due to lack of flash space. It should be in the '128 and '2561 versions.
Mike.
Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
Re: flashing latest er9x
I am using and have compiled M128 version. Where does the hardware menu appear?
Re: flashing latest er9x
Turn the radio ON while holding both horizontal trims away from each other. The hardware menu should now appear in the radio setup index..
João
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
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
Re: flashing latest er9x
Thanks João, it works now.
Re: flashing latest er9x
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
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
-
- Posts: 143
- Joined: Wed May 16, 2012 11:41 pm
- Country: United States
- Location: SF Bay Area, CA
Re: flashing latest er9x
As I wrote the serial LCD driver on er9x and I realized this problem for the serial LCD users.JanRy wrote:Hi everyone,
I've built a M128 board from scratch using serial LCD (http://www.hobbyking.com/hobbyking/stor ... K2_1_.html) with 'Multiprotocol TX' and having problem compiling MBTx to use left vertical trims as per original board (voice module NOT installed).The obvious 'fix' is to use PC0/PC4 for the trim inputs, however PC4 is already used for serial LCD clock line.
Can anyone point me to a compiling options file? Any help appreciated.
Actually, LV trim can be rerouted to PC0/PC1 since LCD CS can be permanently tied to GND by removing 5K resistor in 5V-3.3V logic level translator just like PC4 (LCD WR).
But you need modified versions of 'lcd.cpp' and 'driver.cpp'.
I have a working version of 'lcd.cpp' with updated serial LCD code and plz PM me if you're interested in.
Re: flashing latest er9x
Hi flybabo,
thanks for writing serial LCD library. It made my project possible (re-using DX4e shell). I am happy with the outcome, since I've had no room for a sound module anyway. All is working now.
I am not entirely sure if CS can be left tied to the ground permanently. According to the data sheet: "Chip Select Input .... in case of serial interface, the internal shift register and the counter are reset."
I've had a minor issue with my KK2 LCD. It would not initialise on power-up, but when power was re-applied within 2sec, it would. So I've added a delay of about 30us holding RES high in lcd_init (2 places) and that fixed my issue.
thanks for writing serial LCD library. It made my project possible (re-using DX4e shell). I am happy with the outcome, since I've had no room for a sound module anyway. All is working now.
I am not entirely sure if CS can be left tied to the ground permanently. According to the data sheet: "Chip Select Input .... in case of serial interface, the internal shift register and the counter are reset."
I've had a minor issue with my KK2 LCD. It would not initialise on power-up, but when power was re-applied within 2sec, it would. So I've added a delay of about 30us holding RES high in lcd_init (2 places) and that fixed my issue.
-
- Posts: 143
- Joined: Wed May 16, 2012 11:41 pm
- Country: United States
- Location: SF Bay Area, CA
Re: flashing latest er9x
I think CS can be tied down even for the serial LCD since reset pulse will reset internal shift register and counter after power up.
Once these registers are reset, it is followed by a series of legitimate data transfers and it doesn't need to reset those registers again.
Since entire LCD data lines (PA0-PA7) are not used for a serial LCD, I better to add PA6/PA7 as LV trim rerouting option for serial LCD users to allow them to use the second UART ports for the serial voice card or multi-protocol module.
I also looked into the LCD code and lcd_init() generates 2us reset-low pulse and 1.5ms recovery time with reset-high before starting to set control bits.
Did you put 30us delay before generating 2us reset-low pulse?
Once these registers are reset, it is followed by a series of legitimate data transfers and it doesn't need to reset those registers again.
Since entire LCD data lines (PA0-PA7) are not used for a serial LCD, I better to add PA6/PA7 as LV trim rerouting option for serial LCD users to allow them to use the second UART ports for the serial voice card or multi-protocol module.
I also looked into the LCD code and lcd_init() generates 2us reset-low pulse and 1.5ms recovery time with reset-high before starting to set control bits.
Did you put 30us delay before generating 2us reset-low pulse?
-
- Posts: 143
- Joined: Wed May 16, 2012 11:41 pm
- Country: United States
- Location: SF Bay Area, CA
Re: flashing latest er9x
I just verified that both serial and parallel LCD code work with permanently tied down CS pin.
Since PC4 is used as SCLK in the serial LCD interface, I'll assign PC0/PC1 for "on-board" LV trim rerouting option to relieve the serial port in upcoming er9x-v2 firmware. Note that current er9x-v2 test version assigned PC0/PC4.
That means PC4 is always available for other application.
Since PC4 is used as SCLK in the serial LCD interface, I'll assign PC0/PC1 for "on-board" LV trim rerouting option to relieve the serial port in upcoming er9x-v2 firmware. Note that current er9x-v2 test version assigned PC0/PC4.
That means PC4 is always available for other application.
Re: flashing latest er9x
flybabo,
that's a very good news . I'll check with my KK2 LCD too.
I've added crudely 30us delay just before the reset pulse (@ approx line 910 & line 1000):
"
LcdLock = 1 ; // Lock LCD data lines
PORTC_LCD_CTRL |= (1<<OUT_C_LCD_RES);
delay_1_5us(30000);
PORTC_LCD_CTRL &= ~(1<<OUT_C_LCD_RES); //LCD_RES
"
that's a very good news . I'll check with my KK2 LCD too.
I've added crudely 30us delay just before the reset pulse (@ approx line 910 & line 1000):
"
LcdLock = 1 ; // Lock LCD data lines
PORTC_LCD_CTRL |= (1<<OUT_C_LCD_RES);
delay_1_5us(30000);
PORTC_LCD_CTRL &= ~(1<<OUT_C_LCD_RES); //LCD_RES
"
-
- Posts: 143
- Joined: Wed May 16, 2012 11:41 pm
- Country: United States
- Location: SF Bay Area, CA
Re: flashing latest er9x
You'd added 30ms delay not 30us delay
Does KK2 LCD have a power-on-reset circuitry?
Does KK2 LCD have a power-on-reset circuitry?
Re: flashing latest er9x
yes, you are right, it is 30ms! When testing, it required minimum of 10ms, so I've added 30ms. Still a very short delay on power up.
The data sheet for KK2 lcd that I found doesn't mention power-on-reset circuitry.
The data sheet for KK2 lcd that I found doesn't mention power-on-reset circuitry.