as pasirinkau atmeli... del prikabintos fotkes :) Srotas, skaitymo kryptis: serial rom+rom, tiny2616+mega48,90ls2343, kvarciukai, kvarciukai mega128, mega8, mega16+mega32, lm75, mega162v On 2014.09.26 20:09, KaroliS wrote: > as pasirinkau zaidimams atmega16 , kodel? todel kad tuo metu kai buvo > pirmas mano pasizaidimas su AVR buvo susigalvotas projektelis > panaudojant i2c , uart, lcd 16x2 , dar gal kazka nebelabai prisimenu , > tai kazka turiu literaturos parinkes, pagrinde apie programavima C > kalba mikrovaldikliams , jei domina galiu paieskot , kur imest? man > kaip neprogrameriui ir siaip lameriui sitoj srityje padejo nemazai. su > salyga kad man tai hobis ir as prie to prisedu labai retai taip > normaliai ir neismokau programint ir jau baigiu pamirsti ka mokejau:) > bet kazka veikiancio padaryt pavyksta , aisku nebutinai tai padaroma > teisingai bet veikia o tai ir dziugina. > > > > "Shadowed" <shadowed@bk.ru> wrote in message > news:lvfbvk$2ph$1@trimpas.omnitel.net... >> Vienu zodziu skaitau datascheeta ir neaisku man toks dalykas: >> >> The following code example shows how to set port B pins 0 and 1 high, >> 2 and 3 low, and define the port pins from >> 4 to 5 as input with a pull-up assigned to port pin 4. The resulting >> pin values are read back again, but as previously >> discussed, a nop instruction is included to be able to read back the >> value recently assigned to some of the pins. >> >> unsigned char i; >> ... >> /* Define pull-ups and set outputs high */ >> /* Define directions for port pins */ >> PORTB = (1<<PB4)|(1<<PB1)|(1<<PB0); >> DDRB = (1<<DDB3)|(1<<DDB2)|(1<<DDB1)|(1<<DDB0); >> /* Insert nop for synchronization*/ >> _NOP(); >> /* Read port pins */ >> i = PINB; >> ... >> >> Ok, tai PORTB nustato zema arba auksta lygi atitinkamose kojose, bet >> kodel cia raso kad PB0 ir PB1 aukstam, o PB2 ir PB3 zemam lygiuose ? >> Ar neturetu buti portai PB0, PB1 ir PB4 auksti, o PB2, PB3 ir PB5 zemi? >> tada su DataDirectionRegisterB - raso, kad nuo PB4 iki PB5 pinu yra >> inputai, nors man atrodo kad cia inputai turetu buti PB0, PB1, PB2 ir >> PB3. > -- Bye, Levas -- http://www.vabolis.lt