Espritmodel.com Telemetry Radio
Reply
Thread Tools
Old Sep 02, 2012, 08:22 AM
Design > Build > Fly
Qrome's Avatar
Arizona, USA
Joined Feb 2005
3,823 Posts
Quote:
Originally Posted by i3dm View Post
Can anyone explain how to update the AVRdude CONF file to include Atmega 88P ?
Open the avrdude.conf file in a text editor. Find the M88 section and copy it. Paste it below. Then modify they name and the signature line. The signature line should have the hex values that avrdude is reporting.

By adding the following section to your avrdude, it should allow you to specify -m88P on the command-line.

Code:
#------------------------------------------------------------
# ATmega88P
#------------------------------------------------------------

part
    id               = "m88P";
    desc             = "ATMEGA88P";
     has_debugwire = yes;
     flash_instr   = 0xB6, 0x01, 0x11;
     eeprom_instr  = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,
	             0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF,
	             0x99, 0xF9, 0xBB, 0xAF;
    stk500_devcode   = 0x73;
#    avr910_devcode   = 0x;
    signature        = 0x1e 0x93 0x0f;
    pagel            = 0xd7;
    bs2              = 0xc2;
    chip_erase_delay = 9000;
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
                       "x x x x  x x x x    x x x x  x x x x";

    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
                       "x x x x  x x x x    x x x x  x x x x";

    timeout		= 200;
    stabdelay		= 100;
    cmdexedelay		= 25;
    synchloops		= 32;
    bytedelay		= 0;
    pollindex		= 3;
    pollvalue		= 0x53;
    predelay		= 1;
    postdelay		= 1;
    pollmethod		= 1;

    pp_controlstack     =
	0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
	0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
	0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
	0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
    hventerstabdelay    = 100;
    progmodedelay       = 0;
    latchcycles         = 5;
    togglevtg           = 1;
    poweroffdelay       = 15;
    resetdelayms        = 1;
    resetdelayus        = 0;
    hvleavestabdelay    = 15;
    resetdelay          = 15;
    chiperasepulsewidth = 0;
    chiperasepolltimeout = 10;
    programfusepulsewidth = 0;
    programfusepolltimeout = 5;
    programlockpulsewidth = 0;
    programlockpolltimeout = 5;

    memory "eeprom"
        paged           = no;
        page_size       = 4;
        size            = 512;
        min_write_delay = 3600;
        max_write_delay = 3600;
        readback_p1     = 0xff;
        readback_p2     = 0xff;
	read            = "  1   0   1   0      0   0   0   0",
                          "  0   0   0   x      x   x   x  a8",
                          " a7  a6  a5  a4     a3  a2  a1  a0",
                          "  o   o   o   o      o   o   o   o";

	write           = "  1   1   0   0      0   0   0   0",
                          "  0   0   0   x      x   x   x  a8",
                          " a7  a6  a5  a4     a3  a2  a1  a0", 
                          "  i   i   i   i      i   i   i   i";

	loadpage_lo	= "  1   1   0   0      0   0   0   1",
			  "  0   0   0   0      0   0   0   0",
			  "  0   0   0   0      0   0  a1  a0",
			  "  i   i   i   i      i   i   i   i";

	writepage	= "  1   1   0   0      0   0   1   0",
			  "  0   0   x   x      x   x   x  a8",
			  " a7  a6  a5  a4     a3  a2   0   0",
			  "  x   x   x   x      x   x   x   x";

	mode		= 0x41;
	delay		= 5;
	blocksize	= 4;
	readsize	= 256;
      ;
    memory "flash"
        paged           = yes;
        size            = 8192;
        page_size       = 64;
        num_pages       = 128;
        min_write_delay = 4500;
        max_write_delay = 4500;
        readback_p1     = 0xff;
        readback_p2     = 0xff;
        read_lo         = "  0   0   1   0    0   0   0   0",
                          "  0   0   0   0  a11 a10  a9  a8",
                          " a7  a6  a5  a4   a3  a2  a1  a0",
                          "  o   o   o   o    o   o   o   o";

        read_hi         = "  0   0   1   0    1   0   0   0",
                          "  0   0   0   0  a11 a10  a9  a8",
                          " a7  a6  a5  a4   a3  a2  a1  a0",
                          "  o   o   o   o    o   o   o   o";

        loadpage_lo     = "  0   1   0   0      0   0   0   0",
                          "  0   0   0   x      x   x   x   x",
                          "  x   x   x  a4     a3  a2  a1  a0",
                          "  i   i   i   i      i   i   i   i";

        loadpage_hi     = "  0   1   0   0      1   0   0   0",
                          "  0   0   0   x      x   x   x   x",
                          "  x   x   x  a4     a3  a2  a1  a0",
                          "  i   i   i   i      i   i   i   i";

        writepage       = "  0   1   0   0      1   1   0   0",
                          "  0   0   0   0    a11 a10  a9  a8",
                          " a7  a6  a5   x      x   x   x   x",
                          "  x   x   x   x      x   x   x   x";

	mode		= 0x41;
	delay		= 6;
	blocksize	= 64;
	readsize	= 256;
      ;

    memory "lfuse"
        size            = 1;
        min_write_delay = 4500;
        max_write_delay = 4500;
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
                          "x x x x  x x x x   o o o o  o o o o";

        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
                          "x x x x  x x x x   i i i i  i i i i";
      ;

    memory "hfuse"
        size            = 1;
        min_write_delay = 4500;
        max_write_delay = 4500;
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
                          "x x x x  x x x x   o o o o  o o o o";

        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
                          "x x x x  x x x x   i i i i  i i i i";
      ;

    memory "efuse"
        size            = 1;
        min_write_delay = 4500;
        max_write_delay = 4500;
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  1 0 0 0",
                          "x x x x  x x x x   x x x x  x o o o";

        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 1 0 0",
                          "x x x x  x x x x   x x x x  x i i i";
      ;

    memory "lock"
        size            = 1;
        min_write_delay = 4500;
        max_write_delay = 4500;
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
                          "x x x x  x x x x   x x o o  o o o o";

        write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
                          "x x x x  x x x x   1 1 i i  i i i i";
      ;

    memory "calibration"
        size            = 1;
        read            = "0  0  1  1   1  0  0  0   0  0  0  x   x  x  x  x",
                          "0  0  0  0   0  0  0  0   o  o  o  o   o  o  o  o";
      ;

    memory "signature"
        size            = 3;
        read            = "0  0  1  1   0  0  0  0   0  0  0  x   x  x  x  x",
                          "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
      ;
  ;
Qrome is offline Find More Posts by Qrome
Reply With Quote
Sign up now
to remove ads between posts
Old Sep 02, 2012, 12:39 PM
Registered User
Joined Aug 2012
5 Posts
Is there a way to activate RSSI alarm? If I comment it out in config.h I get this error:

Error 12 undefined reference to `calcRssiLevel' C:\Users\User\Desktop\cl-osd\G-OSD/.././alarms.h 67 1 cl-osd
miami32 is offline Find More Posts by miami32
Reply With Quote
Old Sep 02, 2012, 02:04 PM
throw new IOPilotException();
IceWind's Avatar
Ireland, County Dublin, Dublin
Joined Feb 2005
2,616 Posts
Quote:
Originally Posted by miami32 View Post
Is there a way to activate RSSI alarm? If I comment it out in config.h I get this error:

Error 12 undefined reference to `calcRssiLevel' C:\Users\User\Desktop\cl-osd\G-OSD/.././alarms.h 67 1 cl-osd
RSSI alarm works fine, but there's a error in the code.
In file alarms.h line 67 change from:

gAlarmRssi = calcRssiLevel(ANALOG_IN_2) < ALARM_RSSI_LOW;

to

gAlarmRssi = gSensorRssi < ALARM_RSSI_LOW
IceWind is online now Find More Posts by IceWind
Reply With Quote
Old Sep 02, 2012, 03:50 PM
Registered User
Joined Feb 2012
10 Posts
Cant find any sattellites

I recently flashed my G-OSD (HK Original) with the Truglodite CL-OSD v2.zip from this tread. However - it does not find any sats.

Voltage etc. working like it should. Anyone got suggestions ???

My TX should be ruled out as a source of interference, as I disconnected it during setup.
AirViking is offline Find More Posts by AirViking
Reply With Quote
Old Sep 02, 2012, 03:58 PM
Registered User
Crashed22's Avatar
United States, ID, Boise
Joined Mar 2012
162 Posts
Quote:
Originally Posted by IceWind View Post
RSSI alarm works fine, but there's a error in the code.
In file alarms.h line 67 change from:

gAlarmRssi = calcRssiLevel(ANALOG_IN_2) < ALARM_RSSI_LOW;

to

gAlarmRssi = gSensorRssi < ALARM_RSSI_LOW
Thanks! I too was wondering about this but hadn't got to it yet!
Crashed22 is offline Find More Posts by Crashed22
Reply With Quote
Old Sep 02, 2012, 04:10 PM
Registered User
Joined Aug 2012
5 Posts
Quote:
Originally Posted by IceWind View Post
RSSI alarm works fine, but there's a error in the code.
In file alarms.h line 67 change from:

gAlarmRssi = calcRssiLevel(ANALOG_IN_2) < ALARM_RSSI_LOW;

to

gAlarmRssi = gSensorRssi < ALARM_RSSI_LOW
Thank you very much for your help, I looked for some errors in alarms.h but I'm not so good with programming
miami32 is offline Find More Posts by miami32
Reply With Quote
Old Sep 02, 2012, 05:03 PM
Registered Aircraft Offender
Truglodite's Avatar
Carmichael, CA
Joined Feb 2007
3,508 Posts
Quote:
Originally Posted by IceWind View Post
RSSI alarm works fine, but there's a error in the code.
In file alarms.h line 67 change from:

gAlarmRssi = calcRssiLevel(ANALOG_IN_2) < ALARM_RSSI_LOW;

to

gAlarmRssi = gSensorRssi < ALARM_RSSI_LOW
+1 thank you for finding that. I would have stumbled upon that bug in the next few days with the project I'm doing now. You saved me at least 2 hours of frustration.

Quote:
Originally Posted by AirViking View Post
I recently flashed my G-OSD (HK Original) with the Truglodite CL-OSD v2.zip from this tread. However - it does not find any sats.

Voltage etc. working like it should. Anyone got suggestions ???

My TX should be ruled out as a source of interference, as I disconnected it during setup.
My GPS seemed to be sensitive to orientation with respect to my 5.8 cloverleaf. It did best in the cloverleaf's null zone.

Also, all GPS units seem to have issues near my home. It seems like something in the neighborood is causing GPS interference in general, because a broad spectrum of smart phones also get 1/2 to 2/3 their normal fixes on my property. I thought there was something wrong with my GPS never seeing more than 7, even 40' above my house, fixes sometimes lagged 3-5min, and resolution seemed very jumpy. The first time I took it out to a less urban field for flying it locked on to 9 very, very quickly, and the sat count was in the 8-11 range the entire flight.

Kev
Truglodite is offline Find More Posts by Truglodite
Reply With Quote
Old Sep 02, 2012, 05:24 PM
throw new IOPilotException();
IceWind's Avatar
Ireland, County Dublin, Dublin
Joined Feb 2005
2,616 Posts
I'm glad it was helpful.

Btw, because I can't edit the wiki I'll share it here for future reference.
In regards to changing the text position in the screen it works in the following way.

These are the lines needed in the config.h
---
#define TEXT_LINES 6
#ifdef COLORSYSTEM_NTSC
#define TEXT_TRIG_LINES_LIST 25, 50, 135, 180, 210, 235 // Must be rising line numbers!
#else //PAL
#define TEXT_TRIG_LINES_LIST 50, 66, 170, 205, 255, 280 // Must be rising line numbers!
#endif //COLORSYSTEM_NTSC
---

If you are using NTSC and have the COLORSYSTEM_NTSC enabled you need to change the first set of numbers if instead you're using the default setting PAL it's the second.
The numbers represent rows in the image.

What each row will render can be seen in the layout.h and one thing to have in mind is that the software does the calculations in between these lines so you can't have them too close together.
The minimum I managed to have was 9 of interval for a refresh rate of 3/second, less than that and the text starts to get messed up. (it may also depend on the type of data as I'm only using voltage and rssi it probably behaves in a different way)



This is currently my setup, I've moved as lower as possible to get out of the video from the GoPro and moved the text closer to the center to avoid the blurry areas on the FatShark goggles. It looks squashed in the pic but that is from my capture card.
(and I added the radio and clock icons. )
IceWind is online now Find More Posts by IceWind
Reply With Quote
Old Sep 02, 2012, 09:33 PM
Registered User
Joined Sep 2012
7 Posts
Sorry to make this my first post, I'm at my wit's end here.

I have a G-OSDII. Worked fine with the stock firmware. Flashed with CL-OSD, now it displays the homing circle and nothing else. Here is the list of things I have tried:

1: Made sure my avrdude was recognizing the m88pa.
2: Made sure my color system was set to NTSC (I tried PAL too)
3: Fiddled with TEXT_LINE_MAX_CHARS until my head exploded.
4: Tried AVRStudio5 and Atmel Studio 6.
5: Fiddled with TEXT_TRIG_LINES
6: Downloaded a known good CONFIG.H

All with exactly zero change. I'm getting super frustrated here. I'm no programmer, but I do know my way around a computer and I'm baffled as to what I'm running into here.

PLEASE help me get this up and running!
gregman_1 is offline Find More Posts by gregman_1
Reply With Quote
Old Sep 02, 2012, 10:00 PM
Registered User
Crashed22's Avatar
United States, ID, Boise
Joined Mar 2012
162 Posts
Quote:
Originally Posted by gregman_1 View Post
Sorry to make this my first post, I'm at my wit's end here.

I have a G-OSDII. Worked fine with the stock firmware. Flashed with CL-OSD, now it displays the homing circle and nothing else. Here is the list of things I have tried:

1: Made sure my avrdude was recognizing the m88pa.
2: Made sure my color system was set to NTSC (I tried PAL too)
3: Fiddled with TEXT_LINE_MAX_CHARS until my head exploded.
4: Tried AVRStudio5 and Atmel Studio 6.
5: Fiddled with TEXT_TRIG_LINES
6: Downloaded a known good CONFIG.H

All with exactly zero change. I'm getting super frustrated here. I'm no programmer, but I do know my way around a computer and I'm baffled as to what I'm running into here.

PLEASE help me get this up and running!
Are you flashing both eep, and hex files? Also ensure to clear the memory location, and have the target to g-osd, not debug? Sorry, but that's the extent of my knowledge/help...
Crashed22 is offline Find More Posts by Crashed22
Reply With Quote
Old Sep 03, 2012, 12:33 AM
Registered User
United States, CA, San Jose
Joined Jul 2009
1,360 Posts
Just a quick note that I encounter text corruption whenever EOSD+GPS is compiled with COLORSYSTEM_NTSC defined in config.h. Issue occured with or without GPS Tx connected to pin 30 of Atmega88PA. Recompiled and loaded the .hex and .eep files several times with same outcome. Flashed back to EOSD (no GPS) works fine NTSC enabled.

While a home arrow with GPS would have been nice, I'm still happy with the basic EOSD firmware because it let me connect my FRSky Rx packet LED to display RSSI.

CL-OSD text corruption using EOSD+GPS when compiled for NTSC format (0 min 14 sec)
patricklupo is online now Find More Posts by patricklupo
Last edited by patricklupo; Sep 03, 2012 at 02:30 AM.
Reply With Quote
Old Sep 03, 2012, 03:19 AM
Registered User
Joern's Avatar
Joined Dec 2011
26 Posts
leading Zero in GPS Minute part

Due to the adjustment value for the wrong GPS Position, I lost the leading "0" in the minute part of the GPS Position. I fixed the Problem with the following lines of code in text.h

#ifdef GPS_GOOGLE_FORMAT
if (min < 10000) {
pos = printNumberWithUnit(str, pos, hour, ".0");
}
else {
pos = printNumberWithUnit(str, pos, hour, ".");
}
//pos = printNumberWithUnit(str, pos, hour, ".");
return printNumberWithUnit(str, pos, min, str2);
#else
pos = printNumberWithUnit(str, pos, hour, ":");
pos = printNumberWithUnit(str, pos, min, ".");
return printNumberWithUnit(str, pos, minDecimal, str2);
//return printNumberWithUnit(str, pos, number, str2);
#endif

It worked for me.

Regards
Joern
Joern is offline Find More Posts by Joern
Reply With Quote
Old Sep 03, 2012, 09:30 AM
Registered User
Joined Sep 2012
7 Posts
Quote:
Originally Posted by Crashed22 View Post
Are you flashing both eep, and hex files? Also ensure to clear the memory location, and have the target to g-osd, not debug? Sorry, but that's the extent of my knowledge/help...
Yep, both eep and hex files, target to g-osd.
gregman_1 is offline Find More Posts by gregman_1
Reply With Quote
Old Sep 03, 2012, 01:17 PM
Registered User
Joined Jul 2008
253 Posts
How to know which microprocessor is on GOSD-II (http://www.hobbyking.com/hobbyking/s...roduct=19832)? Because I'm getting this:

c:\Temp\avrdude>avrdude.exe -p m88 -c usbasp -U flash:w:cl-osd.hex -U eeprom:w:c
l-osd.eep

avrdude.exe: warning: cannot set sck period. please check for usbasp firmware up
date.
avrdude.exe: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.06s

avrdude.exe: Device signature = 0x1e930f
avrdude.exe: Expected signature for ATMEGA88 is 1E 93 0A
Double check chip, or use -F to override this check.

avrdude.exe done. Thank you.

Also, should I do something regarding that warning or is it safe to ignore it?
dziedrius is offline Find More Posts by dziedrius
Reply With Quote
Old Sep 03, 2012, 01:52 PM
throw new IOPilotException();
IceWind's Avatar
Ireland, County Dublin, Dublin
Joined Feb 2005
2,616 Posts
That's a Atmega88P, check Qrome's post above that list the settings needed for it.
IceWind is online now Find More Posts by IceWind
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Build Log Super OSD ($90): Open Source Graphic OSD: Vario, 6xADC, Games, Datalog, Dual Video tom66 FPV Equipment 1928 May 24, 2014 11:07 AM
Discussion Open Source Remote Control System (OSRC) Gizmoman31 Radios 152 Apr 24, 2012 06:01 PM
Discussion Open source OSD for FPV UFO_MAN FPV Talk 75 Sep 07, 2011 02:03 PM
Question Open Source Octo Design Available...Looking for someonw who can cut a copy for me... Schatham421 Multirotor Talk 14 Apr 12, 2011 05:22 PM