<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[forum.rcl-radio.ru &mdash; Прошивка LGT8F328P-SSOP20 через Arduino]]></title>
		<link>http://forum.rcl-radio.ru/viewtopic.php?id=516</link>
		<atom:link href="http://forum.rcl-radio.ru/extern.php?action=feed&amp;tid=516&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «Прошивка LGT8F328P-SSOP20 через Arduino».]]></description>
		<lastBuildDate>Fri, 23 Sep 2022 04:04:44 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Прошивка LGT8F328P-SSOP20 через Arduino]]></title>
			<link>http://forum.rcl-radio.ru/viewtopic.php?pid=6645#p6645</link>
			<description><![CDATA[<p>ИЗМЕРЕНИЕ VCC</p><div class="codebox"><pre><code>uint16_t vcc5d1 = 0;

void setup() {
  Serial.begin(9600);
  // using internal 1.024V reference
  analogReference(INTERNAL1V024);
}

void loop() {
  vcc5d1 = analogRead(VCCM);
  vcc5d1 *= 5;

  Serial.print(&quot;Analog Power Supply: = &quot;);
  Serial.print(vcc5d1/4095.00,3);
  Serial.println(&quot;mV&quot;);

  delay(500);
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (liman324)]]></author>
			<pubDate>Fri, 23 Sep 2022 04:04:44 +0000</pubDate>
			<guid>http://forum.rcl-radio.ru/viewtopic.php?pid=6645#p6645</guid>
		</item>
		<item>
			<title><![CDATA[Re: Прошивка LGT8F328P-SSOP20 через Arduino]]></title>
			<link>http://forum.rcl-radio.ru/viewtopic.php?pid=6644#p6644</link>
			<description><![CDATA[<p>ЦАП </p><div class="codebox"><pre><code>void setup() {
  analogReference(INTERNAL4V096);
  pinMode(4, ANALOG);
}

void loop() {
  analogWrite(4, 0);//   0V
  delay(1000);
  analogWrite(4, 62);//  1V
  delay(1000);
  analogWrite(4, 125);// 2V
  delay(1000);
  analogWrite(4, 187);// 3V
  delay(1000);
  analogWrite(4, 249);// 4V
  delay(1000);  
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (liman324)]]></author>
			<pubDate>Fri, 23 Sep 2022 03:28:32 +0000</pubDate>
			<guid>http://forum.rcl-radio.ru/viewtopic.php?pid=6644#p6644</guid>
		</item>
		<item>
			<title><![CDATA[Re: Прошивка LGT8F328P-SSOP20 через Arduino]]></title>
			<link>http://forum.rcl-radio.ru/viewtopic.php?pid=6643#p6643</link>
			<description><![CDATA[<p>АЦП ИЗМЕРЕНИЕ ДИФФЕРЕНЦИАЛЬНОГО СИГНАЛА </p><div class="codebox"><pre><code>#include &quot;differential_amplifier.h&quot;

void setup() {
  Serial.begin(9600);
  analogReference(INTERNAL1V024); ;//INTERNAL1V024 INTERNAL1V25 INTERNAL2V048 INTERNAL2V56 INTERNAL4V096 DEFAULT
}

void loop() {
  int u_plus = analogDiffRead(A0, A1, GAIN_1);//GAIN_1 GAIN_8 GAIN_16 GAIN_32
  int u_minus = analogDiffRead(A1, A0, GAIN_1);//GAIN_1 GAIN_8 GAIN_16 GAIN_32
  float u = 1.024/4095.00*(u_plus-u_minus);
  Serial.print(u,3);Serial.println(&quot; V&quot;);
  delay(1000);
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (liman324)]]></author>
			<pubDate>Fri, 23 Sep 2022 03:09:50 +0000</pubDate>
			<guid>http://forum.rcl-radio.ru/viewtopic.php?pid=6643#p6643</guid>
		</item>
		<item>
			<title><![CDATA[Re: Прошивка LGT8F328P-SSOP20 через Arduino]]></title>
			<link>http://forum.rcl-radio.ru/viewtopic.php?pid=6642#p6642</link>
			<description><![CDATA[<p>АЦП</p><div class="codebox"><pre><code>uint16_t value;

void setup() {
  analogReference(DEFAULT);//INTERNAL1V024 INTERNAL1V25 INTERNAL2V048 INTERNAL2V56 INTERNAL4V096 DEFAULT
  Serial.begin(9600);
}

void loop() {
  value = analogRead(A0);
  Serial.println(value/4095.00*4.096,3);
  delay(1000);
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (liman324)]]></author>
			<pubDate>Tue, 20 Sep 2022 03:16:00 +0000</pubDate>
			<guid>http://forum.rcl-radio.ru/viewtopic.php?pid=6642#p6642</guid>
		</item>
		<item>
			<title><![CDATA[Прошивка LGT8F328P-SSOP20 через Arduino]]></title>
			<link>http://forum.rcl-radio.ru/viewtopic.php?pid=6640#p6640</link>
			<description><![CDATA[<p><a href="https://github.com/dbuezas/lgt8fx">https://github.com/dbuezas/lgt8fx</a></p><p>Добавим плату - <a href="https://raw.githubusercontent.com/dbuezas/lgt8fx/master/package_lgt8fx_index.json">https://raw.githubusercontent.com/dbuez … index.json</a></p><p>Установим lgt8fx<br /><span class="postimg"><img src="http://forum.rcl-radio.ru/uploads/images/2022/09/9295c037961071483e840e0f17e6446f.png" alt="http://forum.rcl-radio.ru/uploads/images/2022/09/9295c037961071483e840e0f17e6446f.png" /></span> </p><p>Откроем для редактирования файл - HardwareSerial.h<br />Найти его можно в Arduino\hardware\arduino\avr\cores\arduino\</p><p>Найдите в файле строку:<br />#define SERIAL_RX_BUFFER_SIZE 64<br />и замените ее на <br />#define SERIAL_RX_BUFFER_SIZE 250<br />сохраните файл</p><p>Приготовьте плату Arduino Nano или UNO</p><p>Откройте в примерах скетч - LarduinoISP</p><p>Прошейте плату Arduino</p><p>Верните в исходное состояние файл HardwareSerial.h и сохраните файл</p><p>Подключите электролитический конденсатор 47 мкФ к плате Arduino между контактами RST и GND</p><p>Подключение плату LGT8F328P-SSOP20 к плате Arduino</p><p>GND&nbsp; GND<br />VCC&nbsp; +5V<br />SWD&nbsp; D12<br />RST&nbsp; &nbsp;D10<br />SWC&nbsp; D13</p><p>Настройте параметры платы LGT8F328P-SSOP20 в Arduino IDE как показано на скриншоте<br /><span class="postimg"><img src="http://forum.rcl-radio.ru/uploads/images/2022/09/0e6d51f3721b37dc3b0c7c63a9143e76.png" alt="http://forum.rcl-radio.ru/uploads/images/2022/09/0e6d51f3721b37dc3b0c7c63a9143e76.png" /></span> </p><p>Если необходимо записать загрузчик нажмите - Записать загрузчик<br />Если необходимо записать скетч нажмите - Загрузить через программатор</p><p>BLINK</p><div class="codebox"><pre><code>void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW
  delay(100);                       // wait for a second
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (liman324)]]></author>
			<pubDate>Mon, 19 Sep 2022 07:20:38 +0000</pubDate>
			<guid>http://forum.rcl-radio.ru/viewtopic.php?pid=6640#p6640</guid>
		</item>
	</channel>
</rss>
