History of MembersPage/NicolasGobet/SerialCommunication
Older Newer
2007-05-12 12:55:30 . . . . MembersPage/NicolasGobet [Measurement after a few hints for serial communication]
2015-01-01 07:00:00 . . . . MembersPage/MarcellGal [bootloader and isp hints]
2015-01-01 07:00:00 . . . . MembersPage/NicolasGobet [Loopback computer serial port. I only get one char when starting board in 38400,]
2015-01-01 07:00:00 . . . . vpn-epfl-b040.epfl.ch [Results and Q.]
2015-01-01 07:00:00 . . . . MembersPage/NicolasGobet [Results and Q.]
2015-01-01 07:00:00 . . . . MembersPage/NicolasGobet [Results and Q.]
2015-01-01 07:00:00 . . . . MembersPage/NicolasGobet [Results and Q.]
2015-01-01 07:00:00 . . . . MembersPage/NicolasGobet [Reorganization]


Changes by last author:

Changed:
-------------------------------------
------------------------------------
Changed:
I'm not yet able to communicate with the processor using serial cable.

Some results show that at least NOT everything is dead. Suggestions appreciated

Old tests and informations about serial communication are to be found here:

MembersPage/NicolasGobet/SerialCommunication/PremierJet

-----

Added:
-> thanks, I answered all the Q. I hope you can help me to deduce something from all these values ;-)
Added:
----
Added:

-> It works great, I get my signal back when loopbacked (small wire on the end of my serial cable, it also means that my cable is ok)

-> Computer configuration, com port number are ok

loopbackcom1port.jpg

----

Added:
-> I tried this without results. I placed a jumper on Pin1 Pin2 from Socket SV2, powered on, waited 10 secs, removed jumper, placed serial cable and tried to communicate usinf bray terminal and 19200,8,n,1 and 9600

-> serial communication doesn't work

Re_exposure_of_IMG_5303b.sized.jpg

----

Added:

-> Ok I measured voltage between SV2 pins and GND:

||ECU SV2 pin#||DSUB pin#||DSUB function||Voltage between GND and SV2 pin||

||1||3||RD||0V||

||2||2||TD||-8,48V||

This is a little bit too high, if I refer to GenBoard/BuildProcedures/SerialPort

-> the same, with a wire pulling down SV2 pin# to GDN:

||ECU SV2 pin#||DSUB pin#||DSUB function||Voltage between GND and SV2 pin||

||1||3||RD||0V||

||2||2||TD||0V||

-> wire pulling up to +4,99V (uC power)

||ECU SV2 pin#||DSUB pin#||DSUB function||Voltage between GND and SV2 pin||

||1||3||RD||4,9V||

||2||2||TD||4,87V||

I also tried different things on the uC:

* checked that all uC GND are connected with each other : OK (pin-22-53-63)

* checked voltage between all uC Vcc (pin-21-52-64) and gnd: I get 4,92V

----

Added:
->

||pin number#||1||2||3||4||5||6||7||8||9||10||11||12||13||14||15||16||

||voltage between GND and pin#||+4,92V||0V||-8,55V||0V||+4,92||+3,8V||+3,81V||+4,92V||+6,8V||+8,89V||+2,3V||+4,42V||-4,51V||-8,57V||-8,57V||0V||

Here is a picture to explain my pin numbers:

IMG_5306c.jpg

----

Changed:
-> I measured voltage between the 2 Xtal pins and I have 0V with power connected. I'm surprised of this result. A friend of mine had taken the board to try to help and had told me that Xtal was OK. This is where i measured:

IMG_5318b.jpg

----

Added:
-> I had already built the cable, using the information found on MembersPage/MattiasSandgren/NickesBMW/AvrBootCode.

So here is the cable schematics:

||AVR pin command||ISP header #||Parallel port pin||Notes||

||AVR /RESET||5||7||Yellow||

||AVR SCK (clock input)||3||8||Black||

||AVR PDI (RXD) (instruction in)||4||9||Red||

||AVR PDO (TXD) (data out)||1||10||Orange||

||Signal Ground||6||18||Brown||

Changed:
-----

Test to know if uC is stuck in bootloader

* All genboards are initially loaded with a firmware, and mintested (supplies, RS232, WBO2 pump, etc... the assembled ones get much more test)

** But it's possible that after an interrupted (or failed) firmware upload, board gets stuck in BootLoader

** try 'S' command in TerminalProgram, try 9600,8n1 and 19200,8n1

*** if in BootLoader, than in 19200,8n1 replies "AVREFI1"

*** if firmware is running, than in 9600,8n1 it replies some '"binary junk")

Sun070204: I've now been able to catch a signal when the board starts but in 38400,8n1n. See on this picture:

bray38400_8_n_1_n.jpg

I started windows hyperterminal and saw one unknow char each time I started the board:

38400_8_n_1_n.jpg

This, in addition to the fact that uC is heating, tells me that uC is not dead.

* Could it be a signal from max232 chipset?

-----

Upload of new firmware using serial communication and megaloader

** You can try to to upload new firmware with or without the -t megaloader (or prog.pl) option, TRY BOTH. Make sure the .bat file has the correct COMx port (like COM4 if that's the one you use)

*** the -t option doesn't work, it is even used as default in the upload-firmware.batin the "VemsMT1.0.53". after "Translation complete" (which means it interpreted the vems.hex file), the script stays stuck for a few seconds => no success

*** so what happens without the -t ?

**** I tried this, using com1. I'm sure this is com1 because I have only one prt and doc of my motherboard told me that it is "com1". In fact, I also tried with another computer. Removing option -t didn't give great results. I know for sure that I'm not able to communicate

megaloader2.jpg

Sun070204: doesn't work

-----

Upload of new firmware using serial communication and prog.pl

** to send a new vems.hex without megaloader, perl ...path.../prog.pl vems.hex :COM3 Etw

*** but you should find out x for your COMx -port first, and find out if you get answer in either 19200,8n1 or 9600,8n1 for 'S' (capital S, see above). If megaloader does not work, prog.pl will likely not work either (and it needs serialport library).

**** I tried to send 'S' command in all the baud rate suggested, but I was unsuccessful. I even tried all other rates.

megaloader.jpg

Sun070204: doesn't work

-------------------

AVR Reflashing using ISPI

The ISPI port can do it. You need to make a cable, such as the popular (STK200 cable) and hook up to a parallel port.

There is nothing vems-specific about this. It is documented in avrdude. Check the

* power-pins

* according to the avrdude (or uisp, or your chosen AVR-programmer SW) docs (avrdude.conf):

** direct connectivity of the programmer cable, preferrably end-to-end (between parport DSUB25 to AVR)

** don't forget that for atmega128 PDI/PDO used instead of the more common MOSI/MISO for smaller AVR-s

Try dumping part of the flash, like

<code>

avrdude -c stk200 -p m128 -t

dump flash 0 512

<code>

If the ISP-comm test does not work, than the AVR has most likely been fried and little can be done about it.

Sun070204:

* I'm not able to connect using avrdude -c bsd -p m128 -t on the uC. I have one Q. I saw somewhere that you burn a fuse after uploading bootloader. I guess it will be difficult for me to upload a new one. Will this burned fuse prevent me from logging onto uC?

*Is there anyway to send something else than bootloader using ISPI?

------------

Misc ISP and RS232 hints

I'm currently fighting similar problems. I have links for the cable I built and what else I did on MembersPage/EzDi. This method should work as long as your avr has power, and the wiring to the pins on the avr are complete (ie, not missing a resistor for say the pullup on rst).

Sun070204: AVR has power, but doesn't work.

I think that my MAX232 is not dead. When I shortcut pin 1 and pin4 from ISPI (bootloader mod) and connect to my board using com1 and 9600,8n1, I can send char to the board and I get them back:

bray9600_8n1n_bootloader.jpg

-> It appears that I had loopbacked the serial port from my computer...

-----

AVR dead?

* Is it normal that I'm not able to see avr, could it be dead?

**What I did was checked all the voltages with a meter (especially the AVR power supply and the MAX232), then checked my serial cable so many times I destroyed it. I eventually built a cable to program via the ISPI and re-installed the boot-loader, but I still don't have a fully functional genboard. I link to another guy's page whose wiki describes how to check the max232 chip if you need to do that.

*** I followed instruction on this page (MembersPage/MattiasSandgren/NickesBMW/AvrBootCode), built the cable (the same bsd version), It's not working. I checked voltage between pin1 pin2 on AVR, is there another one to check to see if AVR is dead? I really don't like to see that spi doesn't work.

------

Hans: I don't know what was on the V3.1 board from the shop.. but try and see the 2, 3 and 4'th guides on this page: http://vems.hu/www.vems.co.uk/VEMS/

* I have read the docs on your page

-------------------------------------------------

-- Answered Q.

* As I own a v3.1, it looks like I can't use EC18-pin14, 15, 26. So I did as written in this guide: http://vems.hu/www.vems.co.uk/VEMS/ConnectingToSerial.html

** repeat the connection here, describe where the DSUBpin-X goes (for 2,3,5), and check directions are OK

*** this is alright, I double checked and this is correct

* My cable works, I measured resistance between DSUB9 and board socket

* Here is a picture of my board now. Don't pay attention to "free" wires. IMG_6536%20(Medium).JPG

* I've looked at this page: http://www.atmel.com/dyn/resources/prod_documents/doc2467.pdf , and on my board pin 1 is at 4,9V(PEN)

** why would that be a problem ? pulled up internally, inside AVR

*What is my com port number?

** just because you only have one com port does not mean it is named "com1". I have only one comm port on my laptop, but it is named "com5". Have you tried all other comm port names (1...8)?

*** I tried com1...com4 i think. there is a scan function in bray terminal and it doesn't find something else than com1 and com2. Megaloader is unable to open com port from com3 to com8. And now I've been able to catch a signal on com1 :)

I also checked that each pin of JP_ISPI is connected to the matching pin on the uC. and drew this schematic:

IMG_5318d.jpg

Changed:
* could someone give me a detailled picture of the v3.1 board to check if resistors are not missing? I would really appreciate this.

* I read somewhere that R6 is sometimes missing on v3.1, where is it located?

So it doesn't work.

------------