___ ( _`\ | | ) | | | | ) | |_) | (____/'
## ### ## ## ## ######
_____ / __ \ | / \/ | | | \__/\ \____/
###### ## ## ## ## ##### ## ####
###### ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
IMPORTANT: enter the case-INsensitive alphabetic (no numbers) code AND WRITE SOME SHORT summary of changes (below) if you are saving changes. (not required for previewing changes). Wiki-spamming is not tolerated, will be removed, so it does NOT even show up in history. Spammers go away now. Visit Preferences to set your user name Summary of change: '''6 wire stepper IAC''' I am going to use a 6 wire stepper for IAC purpose. The two middle wires are on 12V, the rest 4 are controlled with FET-s (INJE,INJF,INJG,INJH). My h table is: h[0]=inj inj inj inj A0 60 50 90. So the lower 4 for bins are used for injector output masks, the upper 4 are for the stepper. I've made two mods in iac.c: <code> iac.c, move_iac() function: - S259(DHIGH, next_step(next_phase & 0x03)); // activate next wire in sequence + digitalout((((next_phase << 4) & 0x30) ^ 0x40), DHIGH); // ie. next_phase==3, equivalent mdh70/f0 - S259(DLOW, next_step(phase & 0x03)); // deactivate previous wire in sequence + digitalout((((phase << 4) & 0x30) ^ 0x40), DLOW); And added this at poweroff part: + digitalout(0x40, DLOW); digitalout(0x50, DLOW); digitalout(0x60, DLOW); digitalout(0x70, DLOW); </code> It seems working right, but it modifies the displayed pulsewidth as well. It bothers me a bit. Any ideas about improving this hack? ** what pulsewidth? the injector pulsewidth ???? Is this the same winavr '''compiler''' that is proven by earlier experiments (remember the element0 of h[0] ?) to be almost certainly '''bad ?''' *** The pulsewidth shown in Megatune. Fortunately in effect it doesn't change anything. Since I installed the lastest WinAVR, I don't have any problem with h[0]. Optional: Add document to category: Wiki formatting: * is Bullet list ** Bullet list subentry ... '''Bold''', ---- is horizontal ruler, <code> preformatted text... </code> See wiki editing HELP for tables and other formatting tips and tricks.