Показаны сообщения с ярлыком FTDI. Показать все сообщения
Показаны сообщения с ярлыком FTDI. Показать все сообщения

четверг, 16 июня 2016 г.

Used Cell Phone Orchestration project

Hi,

I have also a project aimed at developing a low-cost device that can be programmed to perform macroses with your old used cell phone with buttons. Using clever set of MOSFETS it can "press" any button on your phone. I'm goign to use this for High-Altitude Balloon project - to reduce costs of tracking payload to a minimum: you don't need GPS, you don't need radio, you don't need any expensive parts in your payload AS WELL as in your ground station - just a phone that can accept emails and SMS/MMS texts.

Here is the project on hackaday.io https://hackaday.io/project/10130-used-cell-phone-orchestration 

I've published a new Log to the project, which tells about latest soldered and connected tests. Here is a video of what you can do with this device:


понедельник, 29 февраля 2016 г.

PoC for Raspberry Pi Zero Qwerty Hat. With USB keyboard.

Hi,

Still participating in Hackaday&Adafruit contest to win Raspberry Pi Zero. Filmed a video with PoC of using USB keyboard attached to Raspberry and Smartphone as a display.



More details there https://hackaday.io/project/9582-pi-zero-arduino-programming-station 

вторник, 20 января 2015 г.

Incorrectly flashed atmega328p back to life

Hi,

I'm new to microprocessor programming and all the related stuff (bootloaders, fuses, ISPs, etc.), so I faced a newbee issue.

Symptom:

I was trying to flash atmega328P with bootloader that will suport 8MHz internal clock (so that I don't need an external oscillator) and can be futher optimized in terms of power consumption. I did everything correctly in terms of wiring USBasp programmer (I was using the following instructable), but then unintentionally (I just knew that LilyPad bootloader would also work) I programmed LilyPad's bootloader which also means LilyPad's fuses, which also means (as I later discovered) usage of external oscillator (nice tool to decode fuses).

So, that brought me all the way to "Yikes invalid signature 000000" with usage of -F option in avrdude, or "avrdude: error: programm enable: target doesn't answer. 1" without it. Different "-B" options (-B250, -B5, etc.) didn't work for me. Chip is just completely silent.

And also "avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0xfc" when I try to talk to the MCU via Serial ports with help of FTDI chip. At least I could see that chip is not dead comletely, it's replying something. Probably abrakadabra and maybe it could be decoded by using a proper avrdude settings, but I tried different baud rates and other settings and nothing worked.

Cause:

MCU just expect an external clock source and just doing nothing without it.

Resolution:

Connect an oscillator. But what if you don't have a spare one? Do it like me:


This is a wireless NRF24L01 board and it has an oscillator on it, just connect board ground (yellow on the photo and PIN1 on this wireless board) to your MCU ground and oscillator lines (green and white) to PIN9 and PIN10 on your atmega328P.

This fixed everything for me, Chip is alive and I can see all fuses, so I was able to reprogram them.

Although it's a little bit ackward - because oscillator is 16Mhz and LilyPad bootloader expects 8Mhz.

Hopefully this post will save some time for someone who faced the same issue.

UPDATE:
Looks like this is only a one part of the puzzle, the other one is protocol issue which I also mentioned above, it is still present after a correct bootloader is flashed.

Apparently the issue is with not very accurate internal oscillator - it just doesn't work with high baud rates for programming. There is a very good and detailed explanation on how to fix this by re-compiling a bootloader to use slower upload speed, I do not have necessary tools to do that, so I do think I'm going to do that, I think for me it's OK to load firmware via the ISP


I was able to confirm that it's working and chip is perfoming properly using its internal oscillator. Then I can install a code that will programmaticaly set slower baud rate if I need to talk to the firmware onboard the atmega chip.

вторник, 11 ноября 2014 г.

Uploading Arduino .hex from Netgear Stora

AAAAAAAAA

I've done it. After so much pain. I even do not remmeber all the steps. However:


  • I've compiled usb drivers and ftdi drivers. I have a post about it 
  • I've compiled avrdude 6 on my Netgear Stora. Don't ask how. There was also a lot of pain. But for some reason avrdude 6 worked while v5 still cannot be compiled.
  • I have a daemon which talks to arduino, so to program I have to switch it off
  • Then I faced an issue whatever I tried I receive "avrdude: stk500_getsync(): not in sync". Looks like the issue was with my usb and ftdi drivers - for some reasons they can't help avrdude to negotiate a correct baudrate for my arduino. I tried several and looks like 57600 worked for me. I tried terminal mode like this
/root/avrdude-6.0.1/avrdude -t -v -v -v -v -c arduino -p m328p -b 57600 -P /dev/ttyUSB0

  • But then another issue arised - looks like core version of avrdude cannot properly reset the arduino. There are several tricks on how to do that manually - I'll try them later. Also I think Arduino's version of avrdude can do that, but I have issues compiling it on my Netgear (some Perl issues - nothing too serious can be solved in the future). So I went with another solution - I just reset my USB subsystem and then attach to arduino to upload a sketch. To reset the usb subsistem I'm doing the following:

echo -n "1-0:1.0" > /sys/bus/usb/drivers/hub/unbind
echo -n "1-0:1.0" > /sys/bus/usb/drivers/hub/bind

  •  In the above code IDs of your USB hub could be different, so check them in the folder /sys/bus/usb/drivers/hub/, but I guess on all Storas they should be the same.
  • Then upload the sketch, like that:
/root/avrdude-6.0.1/avrdude -v -v -v -v -c arduino -p m328p -b 57600 -P /dev/ttyUSB0 -D -Uflash:w:/home/arduino/Firmw4_4.cpp.hex
Have a good time with your IoT ;)