RE: CDI gr8flyer55    Gallery
View related threads: (in this forum | in all forums)

Logged in as Guest



Users viewing this topic: none
    Search This Thread  
 
Printable Version

All Forums >> Glow Engines, Gas Engines, Fuel & Mfg Support Forums >> Engine Conversions >> RE: CDI gr8flyer55
Page: <<   < prev  9 10 [11] 12 13 14 15 16 17 18   next >   >>  

Tower Hobbies Get Coupon Codes Brands  
Login
Message << Older Topic   Newer Topic >>
RE: CDI gr8flyer55 - 9/13/2012 2:19 AM   
gr8flyer55


 

Posts: 800
Score: 600
Joined: 11/30/2005
Last Login: 5/22/2013
From: Hamburg, PA, USA
Status: offline
Hi Charlie.
I'm trying to use the recommend MPLAB x version I just downloaded and installed. Jake uses it and provided the link for it. Anyway, when it installed, it messed up my other version and now I have nothing. Oh well, guess I'll stick with the assembly version and forget the upgrades now cause I can't use either compiler new or old.
John


Hide Signatures

(in reply to COM)
       Post #: 251

RE: CDI gr8flyer55 - 9/13/2012 3:28 AM   
gr8flyer55


 

Posts: 800
Score: 600
Joined: 11/30/2005
Last Login: 5/22/2013
From: Hamburg, PA, USA
Status: offline
I can't believe their software tech's are of no help whatsoever online..If they didn't write the software then who the hell did? I asked a simple question and got some smartass tech who didn't even know how the software worked..Told him all it did was crash when I run it and needed to know what's wrong.. I'll never download another of their products that's for sure.. Now neither of my versions work at all. I get a "creation error" and it locks up. have to reboot to do anything.. I'm just going to uninstall everything and wait for someone else to do all the work, I'm done.

John

Hide Signatures

(in reply to COM)
       Post #: 252

RE: CDI gr8flyer55 - 9/13/2012 10:15 AM   
COM


 

Posts: 396
Score: 100
Joined: 6/5/2009
Last Login: 3/13/2013
From: Ga, GA, USA
Status: offline
HI John,

You don't need MPLABX. I would suggest against using it. Its really a poor piece of software. I am using 8.85 and everything seems to work ok. did you ever get the latest? its posted on here as a pdf,but I cant seem to save it.

_____________________________

Regards
Charlie M.

Hide Signatures

(in reply to gr8flyer55)
       Post #: 253

RE: CDI gr8flyer55 - 9/13/2012 10:28 AM   
COM


 

Posts: 396
Score: 100
Joined: 6/5/2009
Last Login: 3/13/2013
From: Ga, GA, USA
Status: offline
OK I finally got the latest version,But I am unable to open it on MPLAB. I go through all the motions,but it won't open.
I even tried another C compiler but something is wrong with the file.

_____________________________

Regards
Charlie M.

Hide Signatures

(in reply to COM)
       Post #: 254

RE: CDI gr8flyer55 - 9/13/2012 2:09 PM   
dinoslmn



Posts: 140
Score: 100
Joined: 11/4/2002
Last Login: 5/13/2013
From: Netanya, ISRAEL
Status: offline
Hi,
My saga...
I installed matlab x ide and xc8 compiler, made new project, add source file and see few errors like:
row 50 unexpexted token
row 109 unable to resolve identifier __delay_us
row 114 unable to resolve identifier __delay_us
row 169 unable to resolve identifier __delay_ms
row 170 unable to resolve identifier __delay_ms

then build main project ......not erors ...BUILD SUCCESSFUL (total time: 1s)

Is ok ?

Dino

_____________________________

Dino,
Israel

Hide Signatures

(in reply to COM)
       Post #: 255

RE: CDI gr8flyer55 - 9/13/2012 2:46 PM   
gr8flyer55


 

Posts: 800
Score: 600
Joined: 11/30/2005
Last Login: 5/22/2013
From: Hamburg, PA, USA
Status: offline
Hi Charlie.
I've got the latest source file and it saved just fine. I'll attach it to an email so you'll have it. I can just post the listing of it here with the code tags too. I think I'll just do that. I tried my old version of MPLAB to view it and that worked fine, however there are instructions in some lines that it gives errors on so I can't use that version either. Seems like Jake is the only person who actually got both the compiler and source to compile. This isn't progress to me. More like a leap into the past where absolutely nothing worked and everyone has a problem of some sort. Remember those days?

John


Hide Signatures

(in reply to COM)
       Post #: 256

RE: CDI gr8flyer55 - 9/13/2012 4:07 PM   
gr8flyer55


 

Posts: 800
Score: 600
Joined: 11/30/2005
Last Login: 5/22/2013
From: Hamburg, PA, USA
Status: offline
Here's the file listing. copy and paste into your compiler or whatever you have that is working out of this mess of crap.

John

***********************************************************************
* Filename: 12f683_v0.9b3.c *
* Version: 0.9 beta 3 *
* Date: 8/29/12 *
* Author: Jake Stewart (jakestew@mail.com) *
* Credits: Nyemi, John, jpanhalt *
* Copyright: 2012 Jake Stewart *
*************************************************************************
* License: This code is free for personal and limited commercial use. *
* You may use and modify it as you see fit as long as you do not sell *
* the code or any derivative work or any product containing the above *
* without written permission. Contact me for affordable licensing. *
*************************************************************************
* Processor: PIC12F683 *
* Compiler: MPLAB XC8 *
* Extra files: Standard libraries only *
*************************************************************************
* Description: CDI ignition control program *
* *
* Timer1 is used to time the ignition delay (in uS) *
* Time base is internal RC oscillator. *
*************************************************************************
* Pin assignments: *
* Pin 7 (GP0) = Output for LED/tachometer, active high *
* Pin 6 (GP1) = Output to HV spark circuit, active high *
* Pin 5 (GP2) = Sensor input, interrupt on falling edge (low) *
* Pin 4 (GP3) = Tied low *
* Pin 3 (GP4) = Unused *
* Pin 2 (GP5) = Unused *
*************************************************************************
* Interrupts: *
* GP2 - Triggered by sensor input falling edge *
* TMR1 - Timer1, every 65.5 ms (if not cleared) *
* CCP1IF - Timer1 = CCPR1 (Timer1 period register) *
* *
************************************************************************/

#include
#include
#include // Auto include device specific headers and libraries.
#include // Defines C99 standard data types like uint8_t and uint16_t
#include // For true/false definition

#define _XTAL_FREQ 8000000 // Oscillator/crystal Speed = 4mhz
#define ICLK (_XTAL_FREQ/4) // Instruction clock = XTAL divided by four

Device Config Register: CONFIG1 (see pic12f683.h)
* IO on OSC pins, Watchdog Off, PowerUp Timer On, IO on MCLR, Code Protect Off, Data Protect Off,
* Brown-out Reset Off,Clock Switch Off,Fail-Safe Clock Monitor Off */
__CONFIG(FOSC_INTOSCIO & WDTE_OFF & PWRTE_ON & MCLRE_OFF & CP_OFF & CPD_OFF & BOREN_OFF & IESO_OFF & FCMEN_OFF);

***********************************************************************
* User Settings: *
************************************************************************/

#define SensorDigiDeg 42 // Sensor Digi-Degrees BTDC
#define LowRPMAdvance 42 // Low RPM Advance Degrees (3 RPS - 916 RPM)
#define StartDelay 16406 // Delay to fire spark when starting

#define Dwell_Time 500 // Dwell time, in uS, that output is kept on
#define MSD_Spark 3 // Total number of sparks per revolution when RPM is below Max_MSD_Rev (at least 1)
#define MSD_Low_Spark 4 // Total number of sparks to fire when in LowRPM mode (below 915 RPM)
#define MSD_Start_Spark 5 // Total number of sparks to fire on the first start spark
#define MSD_dDeg 5 // DigiDegrees between multisparks (1 = 1.4 deg)(dwell time not accounted for)
#define Max_MSD_Rev 79 // Maximum RPM (in terms of CurrentRev + 1) to use MSD (78 = 3,005)

**** Ignition Advance Table (257 point, 16-bit table) *****/
const uint16_t DegDelay[257] =
{ **** PASTE TABLE DATA ON THE LINE BELOW *****/
7112,2,44,86,128,170,212,254,296,338,380,422,464,506,548,379,407,435,463,491,519,547,575,603,631,658,686,714,742,770,798,826,854,882,910,938,966,994,1022,1050,1078,1105,1133,1161,1189,1217,1245,1273,1301,1329,1357,1385,1413,1441,1469,1497,1525,1552,1580,1608,1636,1664,1692,1720,1748,1776,1804,1832,1860,1888,1916,1944,1972,1999,2027,2055,2083,2111,2139,2167,2195,2223,2251,2279,2307,2335,2363,2391,2419,2446,2474,2502,2530,2558,2586,2614,2642,2670,2698,2726,2754,2782,2810,2838,2866,2893,2921,2949,2977,3005,3033,3061,3089,3117,3145,3173,3201,3229,3257,3285,3313,3340,3368,3396,3424,3452,3480,3508,3536,3564,3592,3620,3648,3676,3704,3732,3760,3787,3815,3843,3871,3899,3927,3955,3983,4011,4039,4067,4095,4123,4151,4179,4207,4234,4262,4290,4318,4346,4374,4402,4430,4458,4486,4514,4542,4570,4598,4626,4654,4681,4709,4737,4765,4793,4821,4849,4877,4905,4933,4961,4989,5017,5045,5073,5101,5128,5156,5184,5212,5240,5268,5296,5324,5352,5380,5408,5436,5464,5492,5520,5548,5575,5603,5631,5659,5687,5715,5743,5771,5799,5827,5855,5883,5911,5939,5967,5995,6022,6050,6078,6106,6134,6162,6190,6218,6246,6274,6302,6330,6358,6386,6414,6442,6469,6497,6525,6553,6581,6609,6637,6665,6693,6721,6749,6777,6805,6833,6861,6889,6916,6944,6972,7000,7028,7056,7084
}; **** PASTE TABLE DATA ON THE LINE ABOVE *****/

**** FUNCTION PROTOTYPES *****/
static void init(void); // Function prototype (declaration)

**** GLOBAL VARIABLES *****/
union {uint8_t ALL;struct{unsigned GP0:1;unsigned GP1:1;unsigned GP2:1;
unsigned GP3:1;unsigned GP4:1;unsigned GP5:1;};} sGPIO; // Shadow copy of GPIO

volatile uint8_t CurrentRev = 0; // Timer for current revolution
volatile uint8_t LastRev = 0; // Previous revolution time
volatile uint8_t TMR1_Overflow = 0; // Timer1 counter
volatile uint8_t Engine_Running = 0; // Engine running?
volatile uint24_t LowCalc = 0;
volatile uint8_t Unhandled_Interrupt = 0;
volatile uint8_t Spark_Fire = MSD_Start_Spark;
uint8_t i = 0; // Counter variable 1
uint8_t j = 0; // Counter variable 2

void main(void) {
init();
PIE1bits.TMR1IE = 1; // Timer1 interrupt enable
T1CONbits.TMR1ON = 1; // Start Timer1
INTCONbits.GIE = 1; // Enable interrupts

while(1){ // Main loop, Run this loop forever

}
}

static void interrupt isr(void){ All in one IF block to avoid runtime errors */
#if 1 Determine which flag generated the interrupt and service it */

if(PIR1bits.CCP1IF){ **** TIMER1 COMPARE MATCH *****/
for(;Spark_Fire > 0;Spark_Fire){
sGPIO.GP1 = 0; // Turn on HV output by turning GP1 off
sGPIO.GP0 = 1; // Turn on LED/tach (GP0) bit in shadow
GPIO = sGPIO.ALL; // Update GPIO
__delay_us(Dwell_Time); // Load dwell time (uS)
sGPIO.GP1 = 1; // GP1 is normally on (on = off)
sGPIO.GP0 = 0; // Turn on LED/tach (GP0) bit in shadow
GPIO = sGPIO.ALL; // Update GPIO
for(i=MSD_dDeg;i>0;i){ // Loop for each DigiDegree
__delay_us(10);
for(j=CurrentRev>>2;j>0;j){NOP();} // Loop for 1 DigiDegree
}
}
CCP1CONbits.CCP1M = 0; // Compare mode off, so we don't end up here again until the next spark
PIR1bits.CCP1IF = 0; // Clear interrupt flag
}

else if(INTCONbits.INTF){ **** GP2 SENSOR INPUT *****/
LastRev = CurrentRev; // Store previous value
T1CONbits.TMR1ON = 0; // Turn off Timer1
CurrentRev = TMR1H + (TMR1L >> 7); // 8 high bits of Timer1 + the highest low bit (rounding method)
TMR1 = 0; // Reset Timer1
CCP1CONbits.CCP1M = 0b1010; // Set Timer1 CCP compare mode
T1CONbits.TMR1ON = 1; // Turn on Timer1
CCPR1 = DegDelay[CurrentRev]; // Load delay table value
if(CurrentRev > Max_MSD_Rev){Spark_Fire = MSD_Spark;} // Set the MSD sparks if revs are low enough
else{Spark_Fire = 1;}
if(TMR1_Overflow){ // If we overflowed we need to calc the delay time since it's not in the table
LowCalc = CurrentRev + (TMR1_Overflow<<8); // Figure out total elapsed time
CCPR1 = LowCalc * LowRPMAdvance; // Shift one more bit and multiply times our start advance setting
TMR1_Overflow = 0; // Reset TMR1 overflow counter
Spark_Fire = MSD_Low_Spark;
CurrentRev = 255; // CurrentRev should be maxed instead of rolled over to a random number
if(!Engine_Running){ // If our engine isn't running we won't have a valid rev time
CCPR1 = StartDelay; // Use default starting figure
Spark_Fire = MSD_Start_Spark;
Engine_Running = 1; // Hopefully engine fired or at least hits the sensor again at above 3 RPS
}
}
PIR1bits.CCP1IF = 0; // Clear compare interrupt flag
PIE1bits.CCP1IE = 1; // Enable compare interrupt
INTCONbits.INTF = 0; // Clear GP2 Interrupt Flag
}

else if(PIR1bits.TMR1IF){ **** TIMER1 OVERFLOW *****/
CCP1CONbits.CCP1M = 0; // Compare mode off
if(TMR1_Overflow > 7){
Engine_Running = 0; // Engine is not running (under ~2 RPS / ~120 RPM)
}
else{
TMR1_Overflow++; // Increment overflow count (=uS*65536)
}
PIR1bits.TMR1IF = 0; // Clear interrupt flag
}

else { **** UNHANDLED INTERRUPT *****/
if(Unhandled_Interrupt < 255){Unhandled_Interrupt++;}
}
#endif
}

static void init(void) {
OSCCONbits.IRCF = 0b111; // Internal osc = 8MHz
OSCCONbits.SCS = 1; // Use Internal osc
if(OSCCONbits.HTS == 0){__delay_ms(1);} // Wait for HF internal osc to become stable
if(OSCCONbits.LTS == 0){__delay_ms(1);} // Wait for LF internal osc to become stable
INTCON = 0b01010000; // Disable interrupts, except GP2, -TMR0, peripheral
PIE1 = 0b00100001; // Peripheral Interrupt Enable. CCP1, TMR1 on.
PIR1 = 0b000000; // Peripheral Interrupt Request Register
ANSEL = 0b00000000; // Turn off all analog inputs
WPU = 0b000000; // Make sure all internal pull-ups are off
****** GP 543210 *******/
****** Pin 234567 *******/
TRISIO = 0b111100; // 0/1=Output/Input, Pin 234567, Label (GP543210)
sGPIO.ALL = 0b000000; // Set initial pin states (all off) (Shadow write)
sGPIO.GP1 = 1; // GP1 should normally be on (on = off)
GPIO = sGPIO.ALL; // Shadow GPIO -> GPIO
OPTION_REG = 0b10000000; // pullups off, falling edge, Tmr0
CMCON0 = 0b00000111; // comparator config, disable
CCP1CON = 0b00000000; // CCP off, special event mode = 1011 (resets Timer1)
T1CON = 0b00010100; // TMR1 Off, 1:2 prescaler
TMR1 = 0; // Zero Timer1
}


Hide Signatures

(in reply to COM)
       Post #: 257

RE: CDI gr8flyer55 - 9/13/2012 4:51 PM   
COM


 

Posts: 396
Score: 100
Joined: 6/5/2009
Last Login: 3/13/2013
From: Ga, GA, USA
Status: offline
Hi John,

I got it to compile,but I didn't follow Jakes directions.thanks for posting the code.

_____________________________

Regards
Charlie M.

Hide Signatures

(in reply to gr8flyer55)
       Post #: 258

RE: CDI gr8flyer55 - 9/13/2012 5:16 PM   
gr8flyer55


 

Posts: 800
Score: 600
Joined: 11/30/2005
Last Login: 5/22/2013
From: Hamburg, PA, USA
Status: offline
Charlie, what compiler are you using? Version # etc.
Maybe I am missing a required file or driver or something. I get a FVM creation failed error after clicking on the MPLAB icon to run it and that's all the farther I can get with it. I downloaded both of the files Jake listed, installed with the 60 day trial option. Also first tried the free version option, no luck both give the same error. I have a curve edited that's close to the one I use from Nyemi and copied the red cell and pasted it into the source code at line 70 like it says. Saved the source file. Just can't get either of the two MPLAB programs to work at all. I'll send my edited source file to Jake to get it compiled. I need to do testing with it in a chip!!
All the new features in the universe are of absolutely no use to me if I can't get a compiled source to hex file!
Beginning to think all of this work was for nothing and it was never meant to be messed with.

Is there anyone else with all of these problems or have I wasted 4 weeks of my life to end it all by deleting all this garbage?
Tech support from MPLAB is a total waste of time. Either they are the absolute stupidest techs on the face of the earth or the support line is run by ignorant pygmies! What the he'll is going on these days anyway with software companies? I could do better with a dart board!

John


Hide Signatures

(in reply to COM)
       Post #: 259

RE: CDI gr8flyer55 - 9/13/2012 10:49 PM   
COM


 

Posts: 396
Score: 100
Joined: 6/5/2009
Last Login: 3/13/2013
From: Ga, GA, USA
Status: offline
Hi John,

I am using MPLAB v 8.85 and using XC8 C compiler v 1.10. I have a few questions

1) Did you (in MPLAB) select the xc8 compiler as the tool suite to use?

2) did you use the project wizard to create a project and add the .c file to the project?

Charlie

_____________________________

Regards
Charlie M.

Hide Signatures

(in reply to gr8flyer55)
       Post #: 260

RE: CDI gr8flyer55 - 9/13/2012 11:55 PM   
gr8flyer55


 

Posts: 800
Score: 600
Joined: 11/30/2005
Last Login: 5/22/2013
From: Hamburg, PA, USA
Status: offline
Charlie, i can click on the MPLAB IDE icon on my screen and all I get is a small block on the screen that says "FVM creation failed" and the small block stays visible but nothing else happens. No program runs, nothing moves, nothing but the error block on my screen. I have nothing at all working, absolutely nothing.
Can't run the compiler or open the IDE. Nothing. All I have is the file I posted, which is Jake's original source code, and the excel spreadsheet which is viewable in Excel and editable for the advance curve. That's it. Nothing I downloaded from Microchip for the IDE or compiler will even attempt to run. I can't find any computer requirements for it on their site such as memory needed, pentium chip, windows version or other software that would have to be installed first, nothing. This is why I am so frustrated with it. If it would only load and run, I could figure the screens out and what I need to enter or work on. But I get the error screen and it locks up.

There is something either missing or the software is a piece of crap like I am guessing it is and just is flawed beyond anything I can figure out. Nobody is posting anything so I am guessing that this is just a total waste of time and nobody got the IDE to even run. Lets see if I'm right. Anyone who got it to work, let's see a show of hands ............ Didn't think so.

John


Hide Signatures

(in reply to COM)
       Post #: 261

RE: CDI gr8flyer55 - 9/14/2012 4:10 AM   
lovefool


 

Posts: 55
Score: 100
Joined: 8/31/2004
Last Login: 4/29/2013
From: OdawaraKanagawa, JAPAN
Status: offline
John,

your upload of source is incomplete, since "< >" is regarded as html tag at this forum.
You better attach the file as text file.

Jay.

Hide Signatures

(in reply to gr8flyer55)
       Post #: 262

RE: CDI gr8flyer55 - 9/14/2012 8:22 AM  1 votes
jakestew


 

Posts: 144
Score: 180
Joined: 8/13/2011
Last Login: 5/18/2013
From: Moscow, ID, USA
Status: offline
quote:

ORIGINAL: gr8flyer55
All the new features in the universe are of absolutely no use to me if I can't get a compiled source to hex file!
Beginning to think all of this work was for nothing and it was never meant to be messed with.

Is there anyone else with all of these problems or have I wasted 4 weeks of my life to end it all by deleting all this garbage?


I realize you're frustrated by whatever problem is happening with your system.  But please don't call my work garbage.  A superstar programmer with PIC experience probably could have whipped it out  in a few hours, but I spent a lot of time working on this.  The new program is more accurate, has a wider RPM range including calculated delays all the way down to the 2nd spark, it's easier to understand, has more user settings to tweak, has a fancy configurable multispark setup, and hopefully has an easier way to create curves and put them into the program.

With a new program design and these added features there's bound to be a bit of difficulty for some people.  I've tested and compiled this code in MPLAB 8,  MPLAB  X v1.3, and  MPLAB  X v1.4.  With all three IDEs I've used both XC8 v1.01 and XC8 v1.10 to compile.  Aside from a little trouble with a munged hot key mapping when I switched from 1.3 to 1.4 I've had no problems.

I had a test to study for, otherwise I probably could have been more help the last day or two.  We will get this ironed out, even if I have to mail you a computer with everything loaded and ready to go.  Just be patient.


[/end_rant]

John I noticed you posted you had a  "JVM Failed" error when starting MPLAB.  You called it a "FVM creation failed" error in the other posts and emails, and that threw me off until I saw your earlier post.
"JVM" is Java Virtual Machine.  So you have some sort of Java problem.  MPLAB X uses Java and netbeans (whatever that is).
You need to uninstall anything that says Java in your add/remove programs.  There may be several entries for different versions.  They will probably have the coffee cup Java logo by them.
You should also look for "Microsoft Java Virtual Machine" or "Microsoft Virtual Machine".  Uninstall that also, if it's there.

I would also uninstall any MPLAB versions you have.
Also look for and delete the following directories if the uninstallers didn't get them...  (Admin may be your username instead)
C:\Documents and Settings\Admin\Application Data\Sun
C:\Documents and Settings\Admin\Application Data\.mplab_ide

Restart and deal with any errors if there are any.  You shouldn't have to uninstall the XC8 compiler, but you can do that too if you want. 

Now install the latest Java (restart), then install MPLAB.  I'd install MPLAB X, but you could install 8, or even both of them.
-

@COM...  I emailed you the latest files.  RCU is a pain for sharing files.  It's idiotic to limit the extensions you can attach.  When you first had problems I figured they used some sort of non-binary upload mode since I used the .txt extension.  The next one I used .pdf, but of course that wants to make your browser open the file and I guess it's tricky for some browsers to right click and use save as.

From now on I will host the files off-site so there can be no more problems.  I was going to throw up a site real quick... but I got hacked!  Still working on cleaning that up.


@Dino...  Those errors you see are normal.  For some reason MPLAB doesn't know that __delay_us() is a compiler macro and doesn't recognize the identifier.  All this does is make the little red exclamation point appear on the side.  Just ignore it.  Real compile errors will show up in the output window.


@lovefool... The source John posted is fine.  There's no <> in the code, and it's all there.


@everyone... My email is in the source, which was also posted above.  It is...  jakestew {at} mail {dot} com

Anyone who's having problems feel free to send me your settings and I'll be happy to compile a hex for you and email it back.  The only reason I didn't release a binary is because I don't know which settings will work well, so the defaults are essentially just random semi-reasonable numbers I put in for simulator testing.

I'll probably put this in the license for the next release, but...  Unless you somehow consider your ignition curve and settings to be confidential secrets, please send me off a copy of the source, compiled hex, and spreadsheet whenever you find a good running/starting combination.  I'll collect these and make them available for people who want premade hex files or ignition curves.  I ask for the spreadsheet since the way I did the excell sheet I don't think it will be easy to paste the table from the source back into the spreadsheet.




 




_____________________________

http://www.electrofunnel.com/CDI-2012/index.htm

Hide Signatures

(in reply to gr8flyer55)
       Post #: 263

RE: CDI gr8flyer55 - 9/14/2012 9:11 AM   
jakestew


 

Posts: 144
Score: 180
Joined: 8/13/2011
Last Login: 5/18/2013
From: Moscow, ID, USA
Status: offline
For anyone still having trouble with the IDEs...  Here is the command line to invoke the compiler...


"C:\Program Files\Microchip\xc8\v1.10\bin\xc8.exe"  chip=12F683 mode=free asmlist opt=default,+asm,-asmfile,+speed,-space,-debug,9 addrqual=ignore -P summary=default,-psect,-class,+mem,-hex,-file runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+config,+clib,+plib 12F683_v0.9b3.c

 
Make sure that the xc8.exe location is right.  You can change "mode=free" to  "mode=pro" if you want.  It might start your 60 day free trial though, and the size difference is actually very small, contrary to the suggestion from the compiler.  The only other thing to check is the source code filename "12F683_v0.9b3.c" at the very end.

I've tried this line and it works fine.  I've also tested the output hex in the simulator and it seems to behave the same.

For most people who just want to edit the settings, putting this command line in a .bat file or shortcut should work just fine.   No need for the 314 mb IDE download.

Now all you have to do is download a 174 mb compiler to generate that elusive 6 kb hex file!! 


-Jake



 

_____________________________

http://www.electrofunnel.com/CDI-2012/index.htm

Hide Signatures

(in reply to jakestew)
       Post #: 264

RE: CDI gr8flyer55 - 9/14/2012 10:50 AM   
COM


 

Posts: 396
Score: 100
Joined: 6/5/2009
Last Login: 3/13/2013
From: Ga, GA, USA
Status: offline
Hi Jake,

Thanks for all your hard work. I did not get any email with the latest files. I don't want you to feel that all your work is in vain. I can't speak for everyone,but I really appreciate your efforts.




@John

Try what Jake said.IF you still can't get it to work let me know. maybe I can talk you through it over the phone.




_____________________________

Regards
Charlie M.

Hide Signatures

(in reply to jakestew)
       Post #: 265

RE: CDI gr8flyer55 - 9/14/2012 12:13 PM   
lovefool


 

Posts: 55
Score: 100
Joined: 8/31/2004
Last Login: 4/29/2013
From: OdawaraKanagawa, JAPAN
Status: offline
Jake, I meant this. no stdio.h and so on. I have just installed XC8 1.10, so I gonna try to compile your code.

#include
#include
#include // Auto include device specific headers and libraries.
#include // Defines C99 standard data types like uint8_t and uint16_t
#include // For true/false definition

Jay.

Hide Signatures

(in reply to COM)
       Post #: 266

RE: CDI gr8flyer55 - 9/14/2012 12:22 PM   
lovefool


 

Posts: 55
Score: 100
Joined: 8/31/2004
Last Login: 4/29/2013
From: OdawaraKanagawa, JAPAN
Status: offline
I used to use MPLAB 8.80 for asm, so I only added xc8 pro version.
Made a project and added a source file extracted from zip, then clicked "BUILD".

Viola ********** Build successful! **********

I have not changed the curve tho.

Jay.



Attachments
Click to see fullsize image.
Click for fullsize


Hide Signatures

(in reply to lovefool)
       Post #: 267

RE: CDI gr8flyer55 - 9/14/2012 1:16 PM   
gr8flyer55


 

Posts: 800
Score: 600
Joined: 11/30/2005
Last Login: 5/22/2013
From: Hamburg, PA, USA
Status: offline
Jake, I am in no way saying your work was garbage!!!
What I was referring to was Microchip's attempt to keep up with the times in using java script for it's graphical interface!!
You've spent a tremendous amount of time and effort on this project, sorry if I forgot to clarify what I was calling "garbage".

On a much lighter note here, I deleted that new version and installed version 8.87 and now my computer is liking me better!
Microchip's inability to clarify the fact that you needed the very latest Java script updates to have their new version work is in my estimation a lack of attention to a very important detail if they ever expect to get any money from me for the pro version I "had" installed. Left em' a nastygram saying so. No replies yet! Hmmm, maybe their customer support IS run by ignorant Pygmies. Lol

Tested the new hex file in my timer board this morning. Without running an engine, just from what I see, 5 sparks is proving to be too many for the oscillator to keep up with. Changed it back to 3 and is now sparking away happily!!
Engine testing of new curves will begin tomorrow since I must work today. Rest assured Jake, you have beaten the problems and all is well indeed!
Starting to redesign the timer board for icp and curve switch headers for the 1840 chip. Looking good. More on this later.

John


Hide Signatures

(in reply to jakestew)
       Post #: 268

RE: CDI gr8flyer55 - 9/15/2012 12:03 AM   
bluejets


 

Posts: 234
Score: 205
Joined: 3/25/2009
Last Login: 4/15/2013
From: xnot applicable, AUSTRALIA
Status: offline
Link to IDE version 8.87

http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en019469

Hide Signatures

(in reply to gr8flyer55)
       Post #: 269

RE: CDI gr8flyer55 - 9/15/2012 12:31 AM   
bluejets


 

Posts: 234
Score: 205
Joined: 3/25/2009
Last Login: 4/15/2013
From: xnot applicable, AUSTRALIA
Status: offline
I go to the link Jake showed in post#244 but it just leads to pdf files , cannot see any download for the xc compiler.

http://www.microchip.com/pagehandler/en_us/promo/mplabxc/



Hide Signatures

(in reply to jakestew)
       Post #: 270

RE: CDI gr8flyer55 - 9/15/2012 7:27 AM   
jakestew


 

Posts: 144
Score: 180
Joined: 8/13/2011
Last Login: 5/18/2013
From: Moscow, ID, USA
Status: offline
I think I found the problem with MPLAB X here...

That guy says that changing "C:\Program Files\Microchip\MPLABX\mplab_ide\etc\mplab_ide.conf" can fix the problem.
He says to change "-J-XX:MaxPermSize=384m" in that file to "-J-XX:MaxPermSize=128m", or delete that option alltogether.

FYI, if you're not interested in using the graphical debugger/simulator to step through the code and see how it works then just install the XC8 compiler, edit the source file to your liking, and compile from the command line.  The IDE really isn't usefull if you just want to play with the settings and compile the source.

I'm putting the files online so there's no problems trying to attach them here.  I've thrown up a minimal page for the project here...



-Jake

 

_____________________________

http://www.electrofunnel.com/CDI-2012/index.htm

Hide Signatures

(in reply to bluejets)
       Post #: 271

RE: CDI gr8flyer55 - 9/15/2012 7:44 AM   
jakestew


 

Posts: 144
Score: 180
Joined: 8/13/2011
Last Login: 5/18/2013
From: Moscow, ID, USA
Status: offline
If anyone wants to help by making a nice webpage for the project, working on the source code, writing documentation or guides, etc. please email me or just start working on it!
If you put together anything decent I'll be happy to add you to the credits and put it up on the project page.  I just don't have a whole lot of extra time to do all the fancy extras that will make the project better.


-Jake 

_____________________________

http://www.electrofunnel.com/CDI-2012/index.htm

Hide Signatures

(in reply to jakestew)
       Post #: 272

RE: CDI gr8flyer55 - 9/15/2012 8:55 AM   
jakestew


 

Posts: 144
Score: 180
Joined: 8/13/2011
Last Login: 5/18/2013
From: Moscow, ID, USA
Status: offline
Update...
I've done some testing in the actual circuit.  It seems that Dwell_Time works 100% at a setting of 2 uS.  At a setting of 1 it seems to work 0% to about 80% of the time.

This could be because I'm using some fairly long wires to connect the processor into the circuit.  But I suggest that about 5-15 uS would be a good, safe value.

The reason to go larger would be to give the LED time to flash.  If you're using the LED you'll probably want to use a much larger value for Dwell_Time.
I don't have much use for the LED for timing, and I don't think it will give very accurate timing values since you'll get a smear from the time of the spark till the dwell time expires.  I think that would lead to the mark showing up looking like the advance is less than it is.


-Jake


_____________________________

http://www.electrofunnel.com/CDI-2012/index.htm

Hide Signatures

(in reply to jakestew)
       Post #: 273

RE: CDI gr8flyer55 - 9/15/2012 9:43 AM   
Gompy



Posts: 402
Score: 460
Joined: 7/3/2010
Last Login: 5/18/2013
From: Alkmaar, NETHERLANDS
Status: offline
Jake,

CDI's don't have dwelltime only TCI have dwelltime.
http://www.sportdevices.com/ignition/ignition.htm

_____________________________

CU, Rob
http://www.electronics.gompy.net

Hide Signatures

(in reply to jakestew)
       Post #: 274

RE: CDI gr8flyer55 - 9/15/2012 12:00 PM   
jakestew


 

Posts: 144
Score: 180
Joined: 8/13/2011
Last Login: 5/18/2013
From: Moscow, ID, USA
Status: offline
Thanks for pointing that out, but I do understand that CDI has no dwell time.

I just didn't know what else to call the length of time that the processor drives the spark output trigger pin low. I probably should have called it "trigger pulse length" or something similar. But if you did want to use the same program to run a TCI ignition it actually would be correct.

Does a TCI ignition deliver multiple sparks during the dwell time?


On another note... I was trying to see how fast the CDI could spark.  I was only able to get my unit to throw sparks every 4 ms.

That means you could only throw a spark every 15 degrees at 1200 RPM.  So there probably isn't much use in throwing more than 2 sparks total, and even then only at low RPMs.

Of course, my tests might not mean much.  I was throwing hundreds of sparks to see at what speed the unit would quit sparking.  My ignition coil also has a little gap in it and I was just using wire ends instead of a stable and normal spark plug gap.  The gap did seem to affect the speed the sparks could be thrown.

This test also might not apply to only throwing a few sparks every so often.  I only used this test method because it's really not possible to see seperate sparks at such fast speeds.  Hopefully I can figure out a better test method or use my scope on the output directly.  I'm a little worried about attaching my scope directly to such high voltage though.  And I think an inductive timing light would probably just pick up the attempted spark even if it didn't actually spark at the plug.

If anyone has any ideas on this please help me out.


-Jake


_____________________________

http://www.electrofunnel.com/CDI-2012/index.htm

Hide Signatures

(in reply to Gompy)
       Post #: 275

Page:   <<   < prev  9 10 [11] 12 13 14 15 16 17 18   next >   >>  
All Forums >> Glow Engines, Gas Engines, Fuel &amp; Mfg Support Forums >> Engine Conversions >> RE: CDI gr8flyer55
Page: <<   < prev  9 10 [11] 12 13 14 15 16 17 18   next >   >>  





Jump to:


 
Google 



Search | Marketplace | Event Calendar | Local Clubs | Magazine | Product Ratings | New Products | Discussion Forums

Photo Gallery | Instructor Search | Field|Track|Marina Search

Advertisers | Hobby Vendor Resources | Rate Manufacturers | Sign In/Sign Up

SITE MAP!   : :   FORUM RULES

RC Universe is a service of Internet Brands, Inc. Copyright © 2001-2013.

Charities we support that also need your help
Yorkie Rescue | Humane Society | ASPCA | Crohn's-Colitis America


2.066RCU1