Comms wierdness

General Topics for configuring, operating and tuning the Megajolt. Also see the <a href="http://www.autosportlabs.net/MJLJ_V4_Operation_Guide">Operation Guide</a>

Moderators: JeffC, rdoherty, stieg, brentp

Post Reply
KITT
Posts: 0
Joined: Thu Aug 26, 2004 6:53 pm

Comms wierdness

Post by KITT »

Guys,

As some of you many know, I'm trying to fix a knackered MegaJolt for a friend. I've replaced the processor with one Brent sent but it still won't talk to the Java program or via HyperTerminal. So I tried re-programming it with the bootloader and megajolt code. This worked fine!

Any ideas why I can re-program it, but not upload maps to it? I'm thinking perhaps the oscillator's not functioning?

cheers

Matt Dearden
http://www.cate1.co.uk/megajolt

4600cc
Posts: 0
Joined: Sun Jul 11, 2004 1:48 am

There is a communication

Post by 4600cc »

There is a communication chip on board, RS232something. That's the first thing you replace if communicatin don't function. Another thing, voltage you supply to the unit should be 12 volts, maybe 12.5, but not 9 volts off a 9 bolt battery.

If you still unable to fix it, send it to me, I'll fix it.



MartinM
Posts: 433
Joined: Sat Aug 27, 2005 12:08 pm

If you're absolutely certain

Post by MartinM »

If you're absolutely certain that it really is being re-programmed then the oscillator is working fine and the MAX232 is working fine as well. That doesn't explain why it won't take maps though :-(

I use Bray's Terminal to test MJLJ - it's like Hyperterminal but much much better! Download it from:
http://bray.velenje.cx/avr/terminal/
(..and the hint is that the download link is three lines up from the bottom!)

Unzip it to a folder (it's only one file - I leave it on my Desktop) and run it.

Configure the Terminal to use the port you want to, the correct baud rate (4800) stop bits etc at the top and press Connect.

Set the receive box to display Hex - that way you don't get unprintable characters being returned from MJLJ, like what you get in Hyperterminal

In the Transmit area, type a 'C' (no quotes) and press the ->Send button. This is the command to get the MJLJ to send its map to the PC - you should get 128 bytes of data back...and you should be able to see some similarities between the bytes returned and the map itself.

If you send a 'S' to the MJLJ, it returns the runtime display information, as a set of 6 bytes of information.

Report back on what happens....and we'll think some more!

By the way, I always run my MJLJ from a 9v battery on the bench - there's absolutely no reason that it needs a 12v supply...the voltage regulator in the MJLJ is quite happy providing 5v for the circuitry from a 9v supply (well, the regulator gets more like 8.4v, since there is a reverse-polarity protection diode that robs the full 9v by 0.6v, but the regulator is equally happy with that too). The current demands of the MJLJ are tiny. A 9v battery is perfectly adequate.

brentp
Site Admin
Posts: 6282
Joined: Wed Jan 24, 2007 6:36 am

the MAX232 isn't a

Post by brentp »

the MAX232 isn't a 'communication' chip- it's a level-shifter to make the 5V TTL voltages compatible with the RS232 spec and vice versa.

As martin pointed out, a 9V battery is plenty to power the megajolt, if uncertain, just ensure you can measure +5v on the other side of the voltage regulator.

Martin's troubleshooting steps are spot on, thanks for writing that up.
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

KITT
Posts: 0
Joined: Thu Aug 26, 2004 6:53 pm

Results

Post by KITT »

Right, that terminal program didn't work either! Neither C or S gave anything back. I'm using a model boat battery which is 12v so no power issues. I should add that I've got my own MegaJolt (v2) which works fine and communicates with my laptop fine.

Below is the output when reprogramming with the bootloader:

C:\My Documents\megajolt\firmware>hc08sprg com1 mjlJunior_3.0.0.s19
Waiting for HC08 reset ACK...received 0xfc (good).
Calibration break pulse sent. Count: 1
Bootloader version string: KX8-IR
Available flash memory: 0xE000-0xFC7F
Erase block size: 64 bytes
Write block size: 32 bytes
Original vector table: 0xFFDC
Bootloader user table: 0xFC80
Bootloader data (hex): 82 80 00 00 00 78 20 f3
Are you sure to program part? [y/N]: y
Memory programmed: 100%

Which seems to work fine. However, nothing else does!

Any more suggestions?

Matt Dearden
http://www.cate1.co.uk/megajolt

Oliver Sedlacek
Posts: 68
Joined: Mon Sep 13, 2004 8:45 am
Location: The Chalfonts
Contact:

Oscillator problem

Post by Oliver Sedlacek »

If you can program the chip, but it wont talk to you afterwards then you may well have a fault with the crystal oscillator. The microprocessor uses an internal oscillator for downloading and reprogramming, but Megajolt uses the crystal oscillator instead of the internal oscillator because it is more precise.


KITT
Posts: 0
Joined: Thu Aug 26, 2004 6:53 pm

That's my thinking

Post by KITT »

Well I've got a spare oscillator, so I'll replace it and see if that helps. I've already done the voltage checks and there's 5v in all the right places, so no danger of blowing it up!

Matt Dearden
http://www.cate1.co.uk/megajolt

KITT
Posts: 0
Joined: Thu Aug 26, 2004 6:53 pm

Now working!

Post by KITT »

Just in case anyone was wondering I've now got it working. I replaced the oscillator and all is well :o)

cheers

Matt Dearden
http://www.cate1.co.uk/megajolt

Oliver Sedlacek
Posts: 68
Joined: Mon Sep 13, 2004 8:45 am
Location: The Chalfonts
Contact:

Well done

Post by Oliver Sedlacek »

Well done

Post Reply