<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[forum.rcl-radio.ru &mdash; Частотомер FGT8F328 MAX7219 8 разрядов]]></title>
	<link rel="self" href="http://forum.rcl-radio.ru/extern.php?action=feed&amp;tid=535&amp;type=atom" />
	<updated>2025-02-19T14:23:32Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.rcl-radio.ru/viewtopic.php?id=535</id>
		<entry>
			<title type="html"><![CDATA[Re: Частотомер FGT8F328 MAX7219 8 разрядов]]></title>
			<link rel="alternate" href="http://forum.rcl-radio.ru/viewtopic.php?pid=11418#p11418" />
			<content type="html"><![CDATA[<p>Приветсвую всех уч.форума!Ребята,кто поможет?!!,подправить скейч,что бы можно было бы,изменять К дел. для входного делителя частоты и вносить поправку на величину( +-IF пч) и включать\выключать эти величины через внешние кнопки/перемычки,&nbsp; для цифровой шкалы Р.приёмника как сделано здесь:https://www.kn34pc.com/construct/lz2wsg_arduino_ds_sm.html. На МАХ 7219 смотриться гораздо круче!!! Сам в прог. только начинаю разбираться...</p>]]></content>
			<author>
				<name><![CDATA[ED]]></name>
				<uri>http://forum.rcl-radio.ru/profile.php?id=3298</uri>
			</author>
			<updated>2025-02-19T14:23:32Z</updated>
			<id>http://forum.rcl-radio.ru/viewtopic.php?pid=11418#p11418</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Частотомер FGT8F328 MAX7219 8 разрядов]]></title>
			<link rel="alternate" href="http://forum.rcl-radio.ru/viewtopic.php?pid=10537#p10537" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>liman324 пишет:</cite><blockquote><p>Возможно не верны настройки платы, тактовая вместо 32 МГц работает на частоте 16 МГц</p></blockquote></div><p>В настройках стоял Internal 32 MHz, поменял на External 32MHz- всё стало на свои места. Благодарю!</p>]]></content>
			<author>
				<name><![CDATA[grass]]></name>
				<uri>http://forum.rcl-radio.ru/profile.php?id=1881</uri>
			</author>
			<updated>2024-06-17T17:39:39Z</updated>
			<id>http://forum.rcl-radio.ru/viewtopic.php?pid=10537#p10537</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Частотомер FGT8F328 MAX7219 8 разрядов]]></title>
			<link rel="alternate" href="http://forum.rcl-radio.ru/viewtopic.php?pid=10536#p10536" />
			<content type="html"><![CDATA[<p>Возможно не верны настройки платы, тактовая вместо 32 МГц работает на частоте 16 МГц</p>]]></content>
			<author>
				<name><![CDATA[liman324]]></name>
				<uri>http://forum.rcl-radio.ru/profile.php?id=2</uri>
			</author>
			<updated>2024-06-17T17:22:41Z</updated>
			<id>http://forum.rcl-radio.ru/viewtopic.php?pid=10536#p10536</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Частотомер FGT8F328 MAX7219 8 разрядов]]></title>
			<link rel="alternate" href="http://forum.rcl-radio.ru/viewtopic.php?pid=10535#p10535" />
			<content type="html"><![CDATA[<p>Да.</p>]]></content>
			<author>
				<name><![CDATA[grass]]></name>
				<uri>http://forum.rcl-radio.ru/profile.php?id=1881</uri>
			</author>
			<updated>2024-06-17T17:20:25Z</updated>
			<id>http://forum.rcl-radio.ru/viewtopic.php?pid=10535#p10535</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Частотомер FGT8F328 MAX7219 8 разрядов]]></title>
			<link rel="alternate" href="http://forum.rcl-radio.ru/viewtopic.php?pid=10534#p10534" />
			<content type="html"><![CDATA[<p>используете FGT8F328?</p>]]></content>
			<author>
				<name><![CDATA[liman324]]></name>
				<uri>http://forum.rcl-radio.ru/profile.php?id=2</uri>
			</author>
			<updated>2024-06-17T17:09:18Z</updated>
			<id>http://forum.rcl-radio.ru/viewtopic.php?pid=10534#p10534</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Частотомер FGT8F328 MAX7219 8 разрядов]]></title>
			<link rel="alternate" href="http://forum.rcl-radio.ru/viewtopic.php?pid=10533#p10533" />
			<content type="html"><![CDATA[<p>Здравствуйте! Повторил данную конструкцию, но возник вопрос. При замере контрольной штатной частоты на D11 OUTPUT 8 MHz, показания верны, но при замере меандра из другого источника(генератор Ардуино с управлением через com-порт) показания занижены в 2 раза. Пытался посмотреть осциллограмму на D11 OUTPUT 8 MHz, не смог засинхронизироваться, смесь синусоиды и меандра. И ещё, частотомер(как отдельный узел) из Вашей конструкции <a href="http://rcl-radio.ru/?p=66450">http://rcl-radio.ru/?p=66450</a> частоту 8 MHz от генератора Ардуино показывает корректно. В чем может быть проблема? С уважением!</p>]]></content>
			<author>
				<name><![CDATA[grass]]></name>
				<uri>http://forum.rcl-radio.ru/profile.php?id=1881</uri>
			</author>
			<updated>2024-06-17T17:06:06Z</updated>
			<id>http://forum.rcl-radio.ru/viewtopic.php?pid=10533#p10533</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Частотомер FGT8F328 MAX7219 8 разрядов]]></title>
			<link rel="alternate" href="http://forum.rcl-radio.ru/viewtopic.php?pid=9738#p9738" />
			<content type="html"><![CDATA[<p>Подскажите- а как регулировать диапазон яркости в строке&nbsp; WriteBit16(0x0A, 0);// яркость</p>]]></content>
			<author>
				<name><![CDATA[eugen-la]]></name>
				<uri>http://forum.rcl-radio.ru/profile.php?id=1117</uri>
			</author>
			<updated>2024-03-18T18:30:40Z</updated>
			<id>http://forum.rcl-radio.ru/viewtopic.php?pid=9738#p9738</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Частотомер FGT8F328 MAX7219 8 разрядов]]></title>
			<link rel="alternate" href="http://forum.rcl-radio.ru/viewtopic.php?pid=7998#p7998" />
			<content type="html"><![CDATA[<p>oled 0.91&#039; 128x32 i2c</p><p>внести изменения в библиотеку, в файл OLED_I2C.cpp</p><p><span class="postimg"><img src="http://forum.rcl-radio.ru/uploads/images/2023/07/380f4b86669a1c83d1f065233a0025ff.png" alt="http://forum.rcl-radio.ru/uploads/images/2023/07/380f4b86669a1c83d1f065233a0025ff.png" /></span> </p><br /><div class="codebox"><pre><code>#define CAL 62502; //62499 = 1 sec 
#define LED 1
#include &lt;Wire.h&gt; 
#include &lt;OLED_I2C.h&gt;           // http://rcl-radio.ru/wp-content/uploads/2022/01/OLED_I2C.zip

  OLED  myOLED(SDA, SCL, 8);
  extern uint8_t SmallFont[],BigNumbers[];
  unsigned long f_out,tic,n;
 
void setup(){
  PORTD |= (1 &lt;&lt; PD5); // подтягивающий резистор на PD5 (вход T1)
  DDRB |= (1 &lt;&lt; PB3); // D11 OUTPUT 8 MHz
  delay(200);
  noInterrupts();
// TIMER_1 INPUT T1
  TCCR1A = 0;TCCR1B = 0;TCNT1=0;
  TCCR1B = (1 &lt;&lt; CS12) | (1 &lt;&lt; CS11) | (1 &lt;&lt; CS10);
  TIMSK1 = (1 &lt;&lt; TOIE1);
  TCKCSR = (1 &lt;&lt; F2XEN) | (1 &lt;&lt; TC2XS1);
// TIMER_3 1 SEC
  TCCR3A = 0;
  TCCR3B = 0;
  TCNT3=0;
  TCCR3B = (1 &lt;&lt; CS32) | (1 &lt;&lt; WGM32);
  TIMSK3 = (1 &lt;&lt; OCIE3A);
  OCR3A = CAL;
// TIMER_2 OUTPUT 8 MHz
TCCR2A = 0;TCCR2B = 0;TCNT2=0;
  TCCR2A = 1 &lt;&lt; COM2A0 |1 &lt;&lt; WGM21;
  TCCR2B = 1 &lt;&lt; CS20;
  OCR2A = 0;
  interrupts();
  Wire.begin();
  myOLED.begin();
  myOLED.setBrightness(100);
  myOLED.clrScr();
  myOLED.update();
  delay(1000);
  }

void loop(){
  myOLED.clrScr();
  myOLED.setFont(BigNumbers);
if(f_out&gt;=10000000)  myOLED.printNumI(f_out/10000000%10, 0, 35);
if(f_out&gt;=1000000)  myOLED.printNumI(f_out/1000000%10, 15, 35);
if(f_out&gt;=100000)  myOLED.printNumI(f_out/100000%10, 35, 35);
if(f_out&gt;=10000)  myOLED.printNumI(f_out/10000%10, 50, 35);
if(f_out&gt;=1000)  myOLED.printNumI(f_out/1000%10, 65, 35);
if(f_out&gt;=100)  myOLED.printNumI(f_out/100%10, 85, 35);
if(f_out&gt;=10)  myOLED.printNumI(f_out/10%10, 100, 35);
  myOLED.printNumI(f_out/1%10, 115, 35);
  myOLED.update();
  delay(1000);
  if(LED==1){
  if(f_out==0){n++;}else{n=0;}
  if(n&gt;=10){myOLED.setBrightness(0);}else{myOLED.setBrightness(100);}
  }else{myOLED.setBrightness(100);}
  }

ISR(TIMER1_OVF_vect) {tic++;}

ISR(TIMER3_vect) {
  if (TIFR3 &amp; (1 &lt;&lt; OCF3A)){
      TIFR3 = 1 &lt;&lt; OCF3A;
      f_out = tic*0xFFFF + TCNT1;
      tic=0;TCNT1=0;
  }}  </code></pre></div>]]></content>
			<author>
				<name><![CDATA[liman324]]></name>
				<uri>http://forum.rcl-radio.ru/profile.php?id=2</uri>
			</author>
			<updated>2023-06-30T03:14:58Z</updated>
			<id>http://forum.rcl-radio.ru/viewtopic.php?pid=7998#p7998</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Частотомер FGT8F328 MAX7219 8 разрядов]]></title>
			<link rel="alternate" href="http://forum.rcl-radio.ru/viewtopic.php?pid=7997#p7997" />
			<content type="html"><![CDATA[<p>Я подумаю над этим вопросом.</p>]]></content>
			<author>
				<name><![CDATA[liman324]]></name>
				<uri>http://forum.rcl-radio.ru/profile.php?id=2</uri>
			</author>
			<updated>2023-06-25T07:23:05Z</updated>
			<id>http://forum.rcl-radio.ru/viewtopic.php?pid=7997#p7997</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Частотомер FGT8F328 MAX7219 8 разрядов]]></title>
			<link rel="alternate" href="http://forum.rcl-radio.ru/viewtopic.php?pid=7996#p7996" />
			<content type="html"><![CDATA[<p>А можно сделать версию на OLED&nbsp; дисплее по i2c?</p>]]></content>
			<author>
				<name><![CDATA[eugen-la]]></name>
				<uri>http://forum.rcl-radio.ru/profile.php?id=1117</uri>
			</author>
			<updated>2023-06-25T06:25:06Z</updated>
			<id>http://forum.rcl-radio.ru/viewtopic.php?pid=7996#p7996</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Частотомер FGT8F328 MAX7219 8 разрядов]]></title>
			<link rel="alternate" href="http://forum.rcl-radio.ru/viewtopic.php?pid=7300#p7300" />
			<content type="html"><![CDATA[<p>Основная статья - <a href="http://rcl-radio.ru/?p=130049">http://rcl-radio.ru/?p=130049</a></p><p><span class="postimg"><img src="http://forum.rcl-radio.ru/uploads/images/2023/01/6b56d6babfa8054d8e0a77523678a040.png" alt="http://forum.rcl-radio.ru/uploads/images/2023/01/6b56d6babfa8054d8e0a77523678a040.png" /></span> </p><br /><div class="codebox"><pre><code>#define DIN PD4
#define CLK PD2
#define CS  PD3
#define CAL 62502; //62499 = 1 sec 

static unsigned long tic,freq;
bool w=1;
byte fq[8],pd,x;

void setup(){
  PORTD |= (1 &lt;&lt; PD5); // подтягивающий резистор на PD5 (вход T1)
  DDRB |= (1 &lt;&lt; PB3); // D11 OUTPUT 8 MHz
  _delay_ms(2);
  DDRD |= (1 &lt;&lt; DIN) | (1 &lt;&lt; CS) | (1 &lt;&lt; CLK);
  PORTD |= (1 &lt;&lt; CS);
  WriteBit16(0x0F, 0);// тест выкл.
  WriteBit16(0x0C, 1);// вкл. индик.
  WriteBit16(0x0A, 0);// яркость
  WriteBit16(0x09, 0xFF);// дешифраторы вкл.
  WriteBit16(0x0B, 7);// кол-во разрядов
  cl();
  _delay_ms(2);
  noInterrupts();
// TIMER_1 INPUT T1
  TCCR1A = 0;TCCR1B = 0;TCNT1=0;
  TCCR1B = (1 &lt;&lt; CS12) | (1 &lt;&lt; CS11) | (1 &lt;&lt; CS10);
  TIMSK1 = (1 &lt;&lt; TOIE1);
  TCKCSR = (1 &lt;&lt; F2XEN) | (1 &lt;&lt; TC2XS1);
// TIMER_3 1 SEC
  TCCR3A = 0;
  TCCR3B = 0;
  TCNT3=0;
  TCCR3B = (1 &lt;&lt; CS32) | (1 &lt;&lt; WGM32);
  TIMSK3 = (1 &lt;&lt; OCIE3A);
  OCR3A = CAL;
// TIMER_2 OUTPUT 8 MHz
TCCR2A = 0;TCCR2B = 0;TCNT2=0;
  TCCR2A = 1 &lt;&lt; COM2A0 |1 &lt;&lt; WGM21;
  TCCR2B = 1 &lt;&lt; CS20;
  OCR2A = 0;
  interrupts();
}

void loop(){
 if(w==1){w=0;
  if(freq&gt;=10000000){WriteBit16(0x0B, 7);x=8;}
  if(freq&lt;10000000&amp;&amp;freq&gt;=1000000){WriteBit16(0x0B, 6);x=7;}
  if(freq&lt;1000000&amp;&amp;freq&gt;=100000){WriteBit16(0x0B, 5);x=6;}
  if(freq&lt;100000&amp;&amp;freq&gt;=10000){WriteBit16(0x0B, 4);x=5;}
  if(freq&lt;10000&amp;&amp;freq&gt;=1000){WriteBit16(0x0B, 3);x=4;}
  if(freq&lt;1000&amp;&amp;freq&gt;=100){WriteBit16(0x0B, 2);x=3;}
  if(freq&lt;100&amp;&amp;freq&gt;=10){WriteBit16(0x0B, 1);x=2;}
  if(freq&lt;10){WriteBit16(0x0B, 0);x=1;}

  fq[7]= freq/10000000%10;
  fq[6]= freq/1000000%10|0b10000000;
  fq[5]= freq/100000%10;
  fq[4]= freq/10000%10;
  fq[3]= freq/1000%10|0b10000000;
  fq[2]= freq/100%10;
  fq[1]= freq/10%10;
  fq[0]= freq%10%10;

  for(int i=0;i&lt;8;i++){WriteBit16(i+1, fq[i]);}
  }
}

ISR(TIMER1_OVF_vect) {tic++;}

ISR(TIMER3_vect) {
  if (TIFR3 &amp; (1 &lt;&lt; OCF3A)){
      TIFR3 = 1 &lt;&lt; OCF3A;
      freq = tic*0xFFFF + TCNT1;
      tic=0;TCNT1=0;
      w=1;
  }
}
void cl(){for(char i=1;i&lt;=8;i++){WriteBit16(i, 0);}}
void WriteBit16(byte reg, byte data){  
     PORTD &amp;= ~(1 &lt;&lt; CLK);PORTD &amp;= ~(1 &lt;&lt; CS);
     for(int i = 7; i &gt;= 0; i--){
        if(((reg &gt;&gt; i) &amp; 1) == 1){PORTD |= (1 &lt;&lt; DIN);}else{PORTD &amp;= ~(1 &lt;&lt; DIN);}
        PORTD |=(1 &lt;&lt; CLK);PORTD &amp;= ~(1 &lt;&lt; CLK);
        }
     for(int i = 7; i &gt;= 0; i--){
        if(((data &gt;&gt; i) &amp; 1) == 1){PORTD |= (1 &lt;&lt; DIN);}else{PORTD &amp;= ~(1 &lt;&lt; DIN);}
        PORTD |=(1 &lt;&lt; CLK);PORTD &amp;= ~(1 &lt;&lt; CLK);
        }
     PORTD &amp;= ~(1 &lt;&lt; CLK);PORTD &amp;= ~(1 &lt;&lt; DIN);PORTD |=(1 &lt;&lt; CS);
  }</code></pre></div>]]></content>
			<author>
				<name><![CDATA[liman324]]></name>
				<uri>http://forum.rcl-radio.ru/profile.php?id=2</uri>
			</author>
			<updated>2023-01-24T09:43:57Z</updated>
			<id>http://forum.rcl-radio.ru/viewtopic.php?pid=7300#p7300</id>
		</entry>
</feed>
