deladriere / euro-modules

63 stars 18 forks source link

Trying to upload code #4

Closed markfrancombe closed 7 years ago

markfrancombe commented 7 years ago

Hope I can ask this here, I have self built Talko, I have read many differing version of how to upload code including here on git hub talking about Arduino IDE, but also easy uploader, mentioned in the manual, plus terminal bla bla.. I suspect I havent got the bootloader on to the chip yet. I tried this using Atmel Studio and the Olimex AVR/ISP/mk2. and the bootloader file optiboot_atmega328.hex. but im getting.. avrdude: stk500_getsync(): not in sync: resp=0x00

deladriere commented 7 years ago

First thing first : Are you able to communicate with the ATmega328p using the Olimex programmer or are you also having an error there ? Can you set the fuses and flash the bootloader ? Can you try your programmer on an Arduino board, for example, to see if your ISP toolchain it working?

markfrancombe commented 7 years ago

Ill get to your questions... When I plugged it in to test when I get the error I posted, the LED is now NOT showing numbers. (Before I was getting random numbers, mostly 4 after immediat power up, then settling on 6, where it would stay) BUT NOW; I getting a flashing dot. 3 flashes, about 1 second apart, then a pause of about 1 second. Is this is hint to you as to what stage Ive gotten to? When I REMOVE the programmer cable, the dot continues to flash, but the LED shows 6

On Mon, May 8, 2017 at 7:09 AM, deladriere notifications@github.com wrote:

First thing first : Are you able to communicate with the ATmega328p using the Olimex programmer or are you also having an error there ?

Well, Im no expert here, you understand, but if I tried Atmel Studio. Tools/Device programming Set Tool to AVRISP mkII Set Device to ATmega328P Interface to ISP Click Appl Click Device info tab and Read button I get "Detected Device" and lots of info

Does this mean I HAVE connected to the chip-

Can you set the fuses and flash the bootloader ?—

Ahh well no, I didnt set fuses, what should I set them to. (There is a place here to do it (in ATmel Studio), so I think I know how.

Well I don't know if Ive done that, does the flashing dot(above) mean that? I do NOT have a proper running environment, but have tried a file called optiboot_atmega328.hex. That purports to be a bootloader for that chip, is that correct? Can you point me to the bootloader?

Can you try your programmer on an Arduino board, for example, to see if your ISP toolchain it working? NO, Ive not done Arduino before, apart from if you count Teensy...

The error I posted avrdude: stk500_getsync(): not in sync: resp=0x00 comes if I try to program the chip with the Talko software using Arduino 1.0.6 I compile talko_QC (press the tick) I press upload and the complete message is Binary sketch size: 5,682 bytes (of a 32,256 byte maximum) avrdude: stk500_getsync(): not in sync: resp=0x00 (this is in red)

THIS HAPPENS whether I am connected via the Olimex programmer and 6 pin cable OR the usb. IN both cases I have power via ribbon cable applied. (not using jumper or usb power)

Please excuse me if these questions are basic and noobish... Im a noob and proud!

Mark

deladriere commented 7 years ago

Flashing dot is produced by the bootloader. So it is installed random led display is normal as explained in the assembly manual now we need to explore what is wrong with the USB part of the design. If on Windows: did you installed the MCP2200 driver? do you have a com port showing up while connecting the USB port? how do you power the board? do you use the jumper to power the board while connecting the USB port?

did you use a 12MHZ resonator for the MCP2200?

markfrancombe commented 7 years ago

OK glad the bootloaders done. Actually when I first connected the USB I got a automated Windows message saying it was locating and loading the driver. Which seemed to be successful. But I did try to manually load it as described, but unfortunately the link you provided gave a 404. Do you have another source?

Im not too sure about the Com Port... I think I do, (Im afraid Im a mac guy normally so I dont know where to look on a PC.)

Powering the board via the power header, not USB, so no jumper

Resonator, as on the BOM this one. http://no.mouser.com/Search/ProductDetail.aspx?R=PBRC12.00HR50X000virtualkey58110000virtualkey581-PBRC12.00HR50X

deladriere commented 7 years ago

I am Mac user too and we don't need a driver; -) Talko must show up as a new com port when connecting to USB (that will be used to upload the main code withe Easy uploader) Do you see the com port ?

markfrancombe commented 7 years ago

Was trying on PC, but as mentioned.. idiot on PC. Will try mac now. How do I see if i have a com port? (apparently idiot on mac too)

markfrancombe commented 7 years ago

ok went to About my mac, clicked Network tab and can see Active Services? Is this it? Nothing is added when I connect the Talko. http://imgur.com/a/H5owp

deladriere commented 7 years ago

open your terminal type ls /dev/tty. plug talko type ls /dev/tty. again you should see a new entry or plug talko run easyuploader 1) choose the ATmega238p 2) choose the com port 3) try to upload Talko .hex code (not the bootloader)

markfrancombe commented 7 years ago

Tried second first...Same error, nearly as in Arduino on PC. that getsync thing.. avrdude: stk500_recv(): programmer is not responding.. . avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00

avrdude done. Thank you.

Ill try the Terminal thing... yikes...

markfrancombe commented 7 years ago

promising? (Computer called topsecret hence name)

topsecret:~ markfrancombe$ ls /dev/tty.* /dev/tty.Bluetooth-Incoming-Port /dev/tty.MarksiPhone-WirelessiAP

(Here I plugged in Talko)

topsecret:~ markfrancombe$ ls /dev/tty.* /dev/tty.Bluetooth-Incoming-Port /dev/tty.usbmodemFD141 /dev/tty.MarksiPhone-WirelessiAP

deladriere commented 7 years ago

very ! now choose the /dev/tty.usbmodemFD141 in Easy uploader (don't forget to set the chip to Atmega328p ! )

markfrancombe commented 7 years ago

unfortunately, thats the post before... all those attempts... ending in easy uploader

Would you think it might be a build error now? Soldering seems good on everything, but IM a tiny bit worried about the resonator actually... Not looking forward to removing that, so if you had a test I could try (check a volt somewhere) would be nice, but I did just get a hot air re-worker in the mail, not tried it yet so IF YOU THINK IT MIGHT BE IT; I could attempt re-doing that...

deladriere commented 7 years ago

I guess the resonator is ok because the com port is showing up it may be the RTS signal from MCP 2200 failing to auto reset the ATmega328P: check the C1 soldering. You could try manually resetting the ATmega328P while uploading the code: it requires a little practice but its doable. You need to place a switch between the pin 5 and GND on the ISP line and press it once just after sending the code to force the ATmega328P to enter in bootloader mode. It could also be a problem on the RX and TX line (PIN 1 & 2 of ATmega328P). Try to reflow the chip with hot air. I also solve problem by cleaning the excess of flux with IPA

markfrancombe commented 7 years ago

Hi, havent tried you switch idea yet, seems like a botch... last resort kinda thing. I would like to get "normal operation" But is this a hint? After a good IPA clean I plugged in again... this time USB first.. and BEFORE I HAD power on the power conector, the LED lit up, isnt taht only supposed to happen if I CHOOSE to use USB power? and then I need teh jumper. Im not using a jumper, so why is LED working. Adding power, made teh LED much brighter, almost scarily so... I tried Easy Uploader, but ther same. Gonna try reflowing the things you mentinoed and havea general reflow of anything that could be better. Both the Atmel and the mc look fine BTW. Just thought Id mention the above hint... like have a shorted the jumper by accident?

deladriere commented 7 years ago

LED will display random stuff if not program loaded You can verify this by loading the correct program with your programmer. Il should run fine but doing so you would erase the bootloader and loose the possibility of flashing the code with the usb and easyuploader

markfrancombe commented 7 years ago

Hi @deladriere I tried loading Talko1_1VCO.hex with programmer. All seems good. I haven't tried it for audio yet, I need to take it to may studio where my synth is. (yeah stupid way to build/test a module) Thanks very much for all you help. Im happy to leave it as is, I can load using the programmer, of course it would be nice to try out the other software, maybe later. But I do have a few final questions.

1) I think you misunderstood my previous question. Should the module (LED) even work if it is ONLY connected by USB. I thought I had to have the jumper connected for that to work. Mine lit up with ONLY USB power, but no jumper.

2) Is there a difference in operation of the software between the board versions. Mine is the older 1.1 board. The manual I have is for software 1.2 and quotes 18 different "programs". Mine shows 0 1 2 3 4 5 6 7 8 9 0. 1. 2. 3. Thats 14. Is that normal for board 1.1?

3) I notice the manual mentions a 3 position switch, but I only installed a 2 position. (My BOM sent me a 3 position as well, but I thought it was an error)

Thanks again!

Mark

deladriere commented 7 years ago

Hi @markfrancombe

  1. Yeah right I've also observed this with another microcontroller: It is getting (some) power from the RX TX line ! (even without jumper). But this is not an issue.
  2. Yes firmware for version 1.2 are quite different than for 1.1 (BTW how come you are the third one asking for help while building 1.1, not 1.2 ? Someone must have released a few 1.1 PCB I guess)
  3. Version 1.1 needs 2 positions switch, version 1.2 needs a 3 positions switch

So did you test the audio?

markfrancombe commented 7 years ago
  1. OK
  2. I realise that now, so the correct amount of programs are showing up
  3. OK thats fine then.

So did you test the audio?

OK I did now... (took a while, stupidly I build at home, but my synth is in my studio, and havent been able to get there all week.) BUT.. unfortunately, we´re still not there. Plugged it in, seemed to be ok, plugged in audio jack.. silence... not worried, needs a gate to work right? added a gate, and BANG... a really high and loud tone. The module doesnt exactly "Lock up" at this point but the programs seem slow to react as I change the progam knob. NOTHING can stop this sound untill I cycle power. Same thing occurs. Anything simerlar happened before?

deladriere commented 7 years ago

No Gate no sound Please a have a look in the manual: http://www.polaxis.be/wp-content/uploads/2016/03/Talko-Manual-1_1.pdf I guess your speed pot was placed on slow speed so the speech taaaaaaaakes aaaa verrrryyyy looong time to end. Also, the gate is used to interrupt the speech process and read the pot to speed up the display update. This is the normal behavior of version 1.1 ( that was one of the reasons to abandon a pot for the bank and use a rotary encoder in version 1.2)

markfrancombe commented 7 years ago

um.... well ill try again, but i did try wiggling all knobs AND flipping switches while the module was making the noise. So i'm pretty sure it's not functional yet. There was no way i could get it to stop screaming till i pulled the power.

But it WAS weird that it was quite till i sent it a gate. So the gate definitely did something.

deladriere commented 7 years ago

Could be a clock issue: did you set the fuses correctly ?

markfrancombe commented 7 years ago

Im sure I didnt set the fuses at all. And looking for a typical makefile now.. i cant find the settings. If you remember I only got it to work at all by directly uploading the hex with Talko code, not installing bootloader. I used Atmel Studio to do the hex, so should be simple to do the fuses too, can you tell me how they should be set?

OH.. forgot to mentino... YES there was a run of 1.1 done by "pusherman" (check facebook) Thats Philip Wise, dont know why he didnt do 1.2... there is a big user base of open source pcb/panel runs there. If you want to "officially" get him to do a run of 1.2, he will surely give a cut to you.

Made a video for you.. https://youtu.be/raNpUr_oV44

Mark

deladriere commented 7 years ago

the Atmega328P fuses should be set like : low_fuses=0xff high_fuses=0xde extended_fuses=0x05 You can do this with the Atmel Studio under the "Fuses" section

markfrancombe commented 7 years ago

That was it! Works now! Thanks for all your help, sorry for being sucha noob. I never did get the usb working, but the module sounds great as it is, so IM happy. I got success using Atmel but not the Arduino program. Maybe if I could upload JUST the bootloader using Atmel AND do the fuses, it might work? Im to sure that I ever found a confirmed bootloader in hex tho?

Anyway, thanks again,

Mark