Main Menu

Serial output problems

Started by Rx7man, November 09, 2015, 08:26:40 AM

Rx7man

Well, I have an issue with the serial output.. it seems as though it suddenly goes out of sync, and outputs gibberish,  I move a coupe things around and it goes away.. I thought the serial buffer in the arduino may be filling up, so I inserted delays, (millis and micros) and it didn't help.. I remove one or two serial prints and it'll go away, even if I add some others later.. very frustrating when you're trying to debug.  my baud rate is 115200
'94 dually,  67/67 HE351VE, NV5600, ~600hp
'93 ECLB 47RH, new toy truck, H pump project, 1000hp goal, 300K miles
93 XCLB auto, bone stock, 350K miles
93 XCLB 5spd, bone stock, 100K miles

hakcenter

TS2009 Deḇarim 8:2
"And you shall remember that יהוה your Elohim led you all the way these forty years in the wilderness, to humble you, prove you, to know what is in your heart, whether you guard His commands or not.

Rx7man

A few characters of text (variable name) and it's value

Like this

Serial.println("--------------------------");
if(JakeMode){Serial.println("JAKE ON");}
if(WarmupMode){Serial.println("WARMUP MODE");}
if(Running){Serial.println("RUNNING");}
else{Serial.println("STALLED");}
Serial.print("RT = ");
Serial.println(Runtime);

Serial.print("TB = ");
Serial.println(TargetBoost);
Serial.print("Position = ");
Serial.println(VgtRealPosition);
//}
//else{
Serial.print("Temp is ");
Serial.println(VgtTemp);
Serial.print("TSS = ");
Serial.println(TSS.Value);
Serial.print("RPM = ");

Serial.println(RPM.Value);
Serial.print("MAP = ");
Serial.println(MAP.Value);
Serial.print("EGP = ");
Serial.println(EGP.Value);
Serial.print("TPS = ");
Serial.println(TPS.Value);
Serial.print("AUX = ");
Serial.println(AUX);
Serial.print("Pot = ");
Serial.println(PPT);
Serial.print("DPR = ");
Serial.println(DPR);
Serial.print("EGPV = ");
Serial.println(EGPV);
Serial.print("Nozzle = ");
Serial.println(NozzleSize);

Serial.print("Normal mode position = ");
Serial.println(NormalPosition);
Serial.print("Jake mode position   = ");
Serial.println(JakePosition);
Serial.print("Start mode position  = ");
Serial.println(StartModePosition);

'94 dually,  67/67 HE351VE, NV5600, ~600hp
'93 ECLB 47RH, new toy truck, H pump project, 1000hp goal, 300K miles
93 XCLB auto, bone stock, 350K miles
93 XCLB 5spd, bone stock, 100K miles

hakcenter

Remove the variables and work backwards until you find the culprit.

I know when you get close to memory issues things get pretty wonky.
TS2009 Deḇarim 8:2
"And you shall remember that יהוה your Elohim led you all the way these forty years in the wilderness, to humble you, prove you, to know what is in your heart, whether you guard His commands or not.

Rx7man

I think the memory must be the issue... probably to do with fragmentation, etc... it's a PITA but I'll find a way to deal with it... I plan on outputting to serial only when asked by the serial client..


BTW.. do you know what I'd need to change to run the lillbb on the Arduino Mega?  I put it on and it won't communicate... that would solve most of my problems.  The Mega has a big USB cable too, which would be more tolerant of being mashed around on the floor of the truck
'94 dually,  67/67 HE351VE, NV5600, ~600hp
'93 ECLB 47RH, new toy truck, H pump project, 1000hp goal, 300K miles
93 XCLB auto, bone stock, 350K miles
93 XCLB 5spd, bone stock, 100K miles

hakcenter

FreqMeasure uses pin 8 on the Uno and 49 on the Mega, you'll have to jump that if you want to use it.

For making the CANBUS compatible on the Mega check this thread post here : http://www.seeedstudio.com/forum/viewtopic.php?f=23&t=5172&start=10#p19723

13 - SCK
12 - MISO
11 - MOSI
10 - CS

cut and jump these respectively.
TS2009 Deḇarim 8:2
"And you shall remember that יהוה your Elohim led you all the way these forty years in the wilderness, to humble you, prove you, to know what is in your heart, whether you guard His commands or not.

Rx7man

Cool, thanks.   I was thinking someone (Sparkfun? Seeed?) should make a conversion board
'94 dually,  67/67 HE351VE, NV5600, ~600hp
'93 ECLB 47RH, new toy truck, H pump project, 1000hp goal, 300K miles
93 XCLB auto, bone stock, 350K miles
93 XCLB 5spd, bone stock, 100K miles

hakcenter

Not sure honestly. I'm surprised they didn't keep the mega compatible and just add more pins ...
TS2009 Deḇarim 8:2
"And you shall remember that יהוה your Elohim led you all the way these forty years in the wilderness, to humble you, prove you, to know what is in your heart, whether you guard His commands or not.

Rx7man

:banghead:  is about all I can say about it
'94 dually,  67/67 HE351VE, NV5600, ~600hp
'93 ECLB 47RH, new toy truck, H pump project, 1000hp goal, 300K miles
93 XCLB auto, bone stock, 350K miles
93 XCLB 5spd, bone stock, 100K miles

Rx7man

Got it working on the Mega... pin 10 doesn't need to be cut or jumpered.  I had a Sparkfun Protoboard that I jumpered, and I still have the whole rest of the board to play with.. I clipped the pins on the proto board so I leave the lillbb alone.


this will help me a lot
'94 dually,  67/67 HE351VE, NV5600, ~600hp
'93 ECLB 47RH, new toy truck, H pump project, 1000hp goal, 300K miles
93 XCLB auto, bone stock, 350K miles
93 XCLB 5spd, bone stock, 100K miles

Rx7man

Oh, I will probably be removing a couple pullup resistors on the digital inputs on the lillbb if I use them  as outputs.. TBD
'94 dually,  67/67 HE351VE, NV5600, ~600hp
'93 ECLB 47RH, new toy truck, H pump project, 1000hp goal, 300K miles
93 XCLB auto, bone stock, 350K miles
93 XCLB 5spd, bone stock, 100K miles