can someone give something for totally green?
Czy wolisz polską wersję strony elektroda?
Nie, dziękuję Przekieruj mnie tamwitm1212 wrote:Oh, a question for the author: why didn't he use hardware TWI to power the drivers ??
#include
#define F_CPU 10000000
#define __OPTIMIZE__ s
#include
#define set_clk PORTB |= 0b00000001
#define clr_clk PORTB &= ~0b00000001
#define set_data PORTB |= 0b00000010
#define clr_data PORTB &= ~0b00000010
#define set_le PORTB |= 0b00000100
#define clr_le PORTB &= ~0b00000100
#define set_oe PORTB |= 0b00001000
#define clr_oe PORTB &= ~0b00001000
unsigned char linia [48]={0,1,0,1,1,0,1,1,1,0,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,1,};
int main()
{
DDRB = 0xff;
PORTB = 0;
signed char x=0;
clr_le;
set_oe; // wyłączamy prąd diod - można, ale nie trzeba
clr_clk;
for(x=48;x>=0;--x)
{
clr_clk;
if(linia[x] == 1)
{
set_data;
}
else
{
clr_data;
}
set_clk; // i tutaj zatrzaskujemy dane w rejestrze
// zboczem narastającym
}
set_le; // zatrzaskujemy
clr_le; // dane w latchu
clr_oe; // włączamy prąd diod
while(1);
}
Quote:... I connected everything as it should be ...
unsigned char linia [8][10]={
{0,0,1,1,1,1,0,0,0,0},
{0,1,0,0,0,0,1,0,0,0},
{1,0,1,0,0,1,0,1,0,0},
{1,0,0,0,0,0,0,1,0,0},
{1,0,1,0,0,1,0,1,0,0},
{1,0,0,1,1,0,0,1,0,0},
{0,1,0,0,0,0,1,0,0,0},
{0,0,1,1,1,1,0,0,0,0}
};
int main()
{
DDRB = 0xff;
PORTB = 0;
signed char x=0;
signed char y=0;
while(1)
{
for(y=0;y=0;--x)
{
clr_clk;
if(linia[y][x]==1)
{
set_data;
}
if(linia[y][x]==0)
{
clr_data;
}
set_clk;
}
set_le;
clr_le;
_delay_loop_2(300);
}
}
}
mb1988 wrote:As for the watch, no new version was created, although I had a lot of thoughts, mainly about the power supply (coreless transformer) and data transmission to the device (IrDA, Bluetooth, or FM modulation of the power waveform).
mot wrote:Sure. I don't really know what role.Is it possible to use the 555 timer for this project?
mlassota wrote:Just my main concern was the efficiency of the transformer, while inside the coils there would be an aluminum rotor of the motor. There were concerns that the device would be more suitable for an induction heater. The only solution would be to move the coils away from the body itself to minimize eddy current losses. As for your mysterious "00:00:80", I remember that it also showed up to me sometimes. The answer why this is happening can be found directly in the documentation:the aluminum block from which the rotor overlay is made, which enables the mounting of the plate, heats up quite strongly, while the power transferred to the secondary winding was small.
Quote:The 00h register is used to store seconds. Like most values in this clock, the seconds are also stored in BCD format. Bits [3: 0] are units of seconds, while bits [6: 4] are tens of seconds. As we read in the quoted fragment, bit 7 is a control bit that activates the operation of the oscillator. A simple software BCD decoder does not take into account that the older half of the seconds register is not entirely dedicated to storing the tens digit value. And that when the clock is on, we have set to bit 7 and the reading of the seconds always ends with a surprising value of 80Bit 7 of Register 0 is the clock halt
(CH) bit. When this bit is set to 1, the oscillator is disabled. When cleared to 0, the oscillator is enabled. He first
application of power to the device the time and date registers are typically reset to 01/01/00 01 00:00:00
(MM / DD / YY DOW HH: MM: SS). The CH bit in the seconds register will be set to a 1.
ISR(TIMER1_CAPT_vect)
{
TIMER1_OFF;
TCNT1 = 0;
g_tick = ICR1 / RESOLUTION;
g_pos = 0;
OCR1A = g_tick;
TIMER1_ON;
}
ISR(TIMER1_COMPA_vect)
{
if(g_pos < RESOLUTION) OCR1A = OCR1A + g_tick;
// tutaj wyswietlanie
// ....
Send4BytesT(buff);
_delay_us(20);
RED_OFF;
SET_OE;
g_pos++;
}