RalphBacon / LGT8F328P-Arduino-Clone-Chip-ATMega328P

An improved ATMega328P with this cheap clone Logic Green LGT8F328P
GNU General Public License v3.0
146 stars 37 forks source link

3rd party boards support URL #3

Open dbuezas opened 5 years ago

dbuezas commented 5 years ago

Easier installation (via url) + better menu + lots of clock speeds (32/16/8/4/2/1Mhz) + automatic clock prescaler selection (no need for clock_prescale_set ).

https://raw.githubusercontent.com/dbuezas/lgt8fx/master/package_lgt8fx_index.json

Here's my repo: https://github.com/dbuezas/lgt8fx

Hope it is useful for others too.

RalphBacon commented 5 years ago

Excellent work on this David, I shall certainly mention this when I next do a video on the LGT chip (or a general update). Thanks for the heads up.

dbuezas commented 5 years ago

~I'm missing a reference to your video in the repo, as that was my starting point.~ If/when you do a new video, you could also showcase the DAC, I tested it with the oscilloscope and it works quite well.

~The example comes from Larduino. Uncomment line 19 and hook D4 to an Oscilloscope: https://github.com/dbuezas/lgt8fx/blob/master/lgt8f/libraries/lgt328p/examples/lgtdemo/dac0_ramp/dac0_ramp.ino~ To test hook D4 to an Oscilloscope and open examples/lgt328p/dac0_sinus

Also:

  analogReference(INTERNAL1V024);
  analogReference(INTERNAL2V048);
  analogReference(INTERNAL4V096);
  analogReference(DEFAULT); // 5v or whatever you feed it with
  analogReference(EXTERNAL);

All work like a charm. I even hooked it up to my headphones and heard some beeps.

dbuezas commented 5 years ago

We'll soon have an API for the Differential Amplifier also! This board is so much better than the old atmel one...

dbuezas commented 5 years ago

Differential Amplifier working with all (available) pin combinations! I want to update the lib tomorrow. First new non-arduino feature! :)

dbuezas commented 5 years ago

I burned the usb input diode through sloppy testing (I think I accidentally connected 5v to GND). Luckily the diode is not crucial so I bridged it and was able to finish the Differential Amplifier Library.

It is available in the just released v1.0.3 of the core (examples/differential_amplifier)

Feedback welcomed! :) @RalphBacon more material for an update video? :) I created some material to explain how it is implemented: https://github.com/dbuezas/lgt8fx/blob/master/docs/differential-amplifier/readme.md

MRiutort commented 1 year ago

Hi dear people: I have an IDE compilation error while using this hardware definition on the latest Arduino IDE for a source code also downloaded from here, Github. I have the information about the error code but not know to whom inform/ask about it. The main problem is that the source code compile without error when using standard arduino nano board definition, but not when using this board definition.

This is the code: https://github.com/pu2clr/SI4735

The board on myy ATS-20 is the green like nano board and the error code is this one:

In file included from c:\Users**\Documents\Arduino\libraries\Tiny4kOLED\src/Tiny4kOLED_Wire.h:12:0, from c:\Users**\Documents\Arduino\libraries\Tiny4kOLED\src/Tiny4kOLED.h:12, from C:\Users**\Documents\ats-20\SI4735-master\examples\SI47XX_10_RDS\SI4735_04_RDS_ALL_IN_ONE_OLED_MRG\SI4735_04_RDS_ALL_IN_ONE_OLED_MRG.ino:83: c:\Users**\Documents\Arduino\libraries\Tiny4kOLED\src/Tiny4kOLED_common.h:189:16: error: macro "nop" passed 1 arguments, but takes just 0 void nop(void); ^ exit status 1

Compilation error: exit status 1

This only occur when compiling with your hardware definition for the board you have publish here. Any help, suggestion or comments are welcome.

Milton