-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
renew core and libraries/SPI with ArduinoCore-1.8.3 #50
Conversation
update core code based on ArduinoCore-avr 1.8.3 ToDo: - remove HID.cpp, platform.h (this code is removed at arduino-1.6.6) and add libraries/HID - create LGT8x version DigitalToggle.h and DigitalToggle.cpp, and remove digitalToggle() from wiring_digital.c (this function is supplied from https://playground.arduino.cc/Code/DigitalToggle/ )
mainly cosmetic changes. - add delay(100) to DigitalPotControl.ino - move NOP inside #if defined(__LGT8FX8P__) ~ #endif at transfer(void buf *, size_t count), virtually same code.
0dd93f9
to
26248ad
Compare
First merge jg1uaa, will take care the conflicts after. |
Oh, you have already fixed delayMicroseconds() in Wiring.h... sorry. I will fix this and push again. |
Improved accuracy in delayMicroseconds() (#51) * Update Arduino.h * Update wiring.c * Delete unnecessary files. * Delete unnecessary files. * Delete unnecessary files.
well, modifying delay() definition in Arduino.h is once cancelled (force-push is for that operation), but resolved wiring.c is still conflicted. It looks no code difference... |
I will once close this PR, resolve conflict and re-submit again. BTW, does anyone know how to write bootloader to LGT8F328P? |
Awesome, thanks!
https://github.com/dbuezas/lgt8fx/blob/master/lgt8f/libraries/LarduinoISP/readme.md |
I got SWDICE mkII Pro and I tried to repair my LGT8F328 board. I always perform read after programming FlashROM, but veriyfing itself make things worse... |
Did you use a LGT8 or an ATmega32 as ISP ? Personally, I was confused when I tried to make an ISP using an Arduino Nano, because there seems to be different ISP projects :
Also, LGTISP wants you to connect RESET to VCC on the ISP, while LarduinoISP wants you to connect a pullup resistor to SWC ... Very confusing. My working combination was : Arduino Nano + .hex from LGTISP + pullup resitor from LarduinoISP. Regarding the writing of the Booloader it works for me.
It also happen to me when I dump flash using AVRDUDE and my ISP. But when I upload a sketch using Arduino IDE and AVR ISP, it's ok. An other issue I encounter is that, once programmed using the ISP, the LGT board starts running the sketch at the wrong clock speed and needs an hard reset. |
I updated the instructions a while back. It works well using an lgt8f328p as ISP (but follow the instructions). Do you want to make a small "tutorial" of how to use a atmega nano as ISP? :) |
I have not tried with a lgt8 as ISP yet because i still have unsolved serial communication stability issues with my LGT8 :-/
Not yet. |
Isn't the source code just the same? It probably doesn't build for the Arduino nano because it requires a bigger serial buffer configured. It's defined in HardwareSerial.h as 64. Temporarily change it to 256 (in the atmel core) and it should work. |
Yes ! You are correct ! And updating bootloader and uploading sketches works. Now, just have to understand why |
@jg1uaa :
LGTISP/LarduinoISP dont fully implement the LGTISP/LarduinoISP implementation of |
@SuperUserNameMan I see. Indeed flash_read_page() in brother-yan's LGTISP looks something incomplete. https://github.com/brother-yan/LGTISP/blob/master/LGTISP.ino#L398 And I connect WeMos TTGO XI (aka OCROBOT ALPHA) with any writer as following:
This board can operate both 3.3V and 5V, but it annoys us how to apply the programming voltage to CPU. VIO pad is directly connected to LG8F328's VCC pin, I didn't use any pull-up resistor, is this mandatory? |
@jg1uaa :
According to the experience i read from other users, it is optional.
Actually, regarding usage with AVRdude, I've uploaded an improved version of LarduinoISP here : https://github.com/SuperUserNameMan/LGTISP Many functionalities are not supported ( There is also a discussion on the forum : https://github.com/dbuezas/lgt8fx-forum/issues/1 |
No description provided.