تبلیغات
avr-cimos-ttl-prozhe
avr-cimos-ttl-prozhe
نا برده رنج گنج میسر نمی شود من تمام تلاش خودمو می کنم که به شما عزیزان هر کمکی که از دستم بر می یاد رو برسونم

لینکدونی

آرشیو موضوعی

آرشیو

← آمار وبلاگ

  • کل بازدید :
  • بازدید امروز :
  • بازدید دیروز :
  • بازدید این ماه :
  • بازدید ماه قبل :
  • تعداد نویسندگان :
  • تعداد کل پست ها :
  • آخرین بازدید :
  • آخرین بروز رسانی :

سنسور تشخیص فاصله با مادون قرمز تا 8 فاصله به صورت خطی

upsara

قیمت برای این پروژه  به همراه توضیحات و فایل پروتوس  40000 تومان است. 

ماشین حساب حرفه ای با میکروکنترلر

شماتیک در اصرع وقت میگذارم  

Hex

 

 

:0C0000000C9451000C9400000C940000C3

:10000C000C9400000C9400000C9400000C94000064

:10001C000C9400000C9400000C9400000C94000054

:10002C000C9400000C9400000C9400000C94000044

:10003C000C9400000C9400000C9400000C94000034

:10004C000C9400000C940000000053696E200043D7

:10005C006F73200054616E2000436F742000615355

:10006C00696E0061436F73004C6F672000537172AF

:10007C00742000657870200080C001002D4E414E28

:10008C00000001000700540002008D0184000100F3

:10009C00910186000000F894EE27ECBBF1E0FBBF69

:1000AC00EBBFE5BFF8E1F1BDE1BD8DE0A2E0BB2700

:1000BC00ED938A95E9F780E094E0A0E6ED93019743

:1000CC00E9F7EEE8F0E085919591009761F0A59144

:1000DC00B59105901590BF01F00105900D92019717

:1000EC00E1F7FB01F0CFEFE5EDBFE4E0EEBFC0E6DA

:1000FC00D1E00C948100EFE0E7BBE7E0E4BBEFE07C

:10010C00E1BBE0E1EA930E94C80302D0FECFFFCF2F

:10011C001A930A9301E010E00E94480719F40E9418

:10012C004E0796C0EAE07E1610F40E946907E9E0DB

:10013C00E71518F4E0E17E1608F046C0EFE0E7158D

:10014C0019F40E944E0784C0672C0E949F07E1E0BF

:10015C00F0E0FA93EA9352D1002E012AA9F10E9401

:10016C00480719F40E944E0773C0EAE07E1600F5AA

:10017C000E94A4070E94AD07DF01CB01E72D0E946E

:10018C00B4070E94030AE0936401F0936501609345

:10019C006601709367010E949F070E94BA070E9434

:1001AC00FC030E94BA070E949A030E94BF070BC06F

:1001BC00EEE0E71541F4EDE3EA930E9481034FD0A2

:1001CC00772400E010E0C8CFEFE0E71510F00C94B6

:1001DC002E010E946B03E0E0E0936001E09361016B

:1001EC00E0936201E0936301E0936401E0936501A5

:1001FC00E0936601E0936701E0936801E093690185

:10020C00E0936A01E0936B010E949F07E2E0F0E04B

:10021C00FA93EA93F3D0672C01E010E0002E012A48

:10022C00B9F00E94480719F40E944E0711C0EAE089

:10023C007E1618F40E94690708C0EEE0E71529F451

:10024C00EDE3EA930E94810358D001E010E0E6CF81

:10025C00E0E0F0E060E070E0099119910895EAE0C7

:10026C00E61521F40E94C5070E94D607EBE0E615BF

:10027C0031F40E94C5070E94510A0E94E107ECE08C

:10028C00E61541F40E94A4070E94EA070E94FC09AB

:10029C000E94E107EDE0E61531F40E94C5070E94CB

:1002AC00030A0E94E10793C00E94F3070E94F8071B

:1002BC0044245524E881F9814E165F06A4F4A091DC

:1002CC006C01B0916D0180916E0190916F01EAEE1D

:1002DC00F7EE6DE270E40E94510A0E94F807F201F9

:1002EC0031962F01E7CFE0916C01F0916D01609197

:1002FC006E0170916F010C9469030E94EA07A5E3EB

:10030C00BAEF8EE89CE30E94510AE0937001F093DF

:10031C0071016093720170937301E0E1E61531F4A1

:10032C000E9401080E94B7050E94E107E1E1E61571

:10033C0031F40E9401080E942E060E94E107E2E1BE

:10034C00E61531F40E9401080E943A060E94E1076A

:10035C00E3E1E61541F40E9401080E943A060E946E

:10036C000C080E94D607E4E1E61531F40E9401085E

:10037C000E94C7060E94E107E5E1E61531F40E94F0

:10038C0001080E941B070E94E107E6E1E61541F413

:10039C000E94EA070E9438090E942B050E94E1077F

:1003AC00E7E1E61541F40E94EA070E9438090E9431

:1003BC00EF080E94E107E8E1E61549F40E94EA071C

:1003CC000E949209FA93EA936FDF0E94E107E09191

:1003DC006801F091690160916A0170916B010E9452

:1003EC003809E3E0EA930E94BA070E9428040E94AD

:1003FC00BA070E949A030E9411080895A881B98136

:10040C00119711F5AA81BB811A9721F4EFE2EA93B7

:10041C000E948103AA81BB811B9721F4EAE2EA9333

:10042C000E948103AA81BB811C9721F4EDE2EA931F

:10043C000E948103AA81BB811D9721F4EBE2EA9310

:10044C000E9481030E941108A881B981129711F0B2

:10045C000C947A02AA81BB81509721F4E6E5F0E076

:10046C000E941708AA81BB81519721F4EBE5F0E0BB

:10047C000E941708AA81BB81529721F4E0E6F0E0B4

:10048C000E941708AA81BB81539721F4E5E6F0E09E

:10049C000E941708AA81BB81549721F4EAE6F0E088

:1004AC000E941708AA81BB81559721F4EFE6F0E072

:1004BC000E941708AA81BB81569721F4E4E7F0E06B

:1004CC000E941708AA81BB81579721F4E9E7F0E055

:1004DC000E941708AA81BB81589721F4EFE7F0E03E

:1004EC000E9417080E9411080C943B071A9311E004

:1004FC00103011F40C941A03909A91989298939846

:10050C00849B03C0E7E0F0E08FC0859B03C0E8E06C

:10051C00F0E08AC0869B03C0E9E0F0E085C0879BD1

:10052C0003C0EAE0F0E080C09098919A929893987A

:10053C00849B03C0E4E0F0E077C0859B03C0E5E05A

:10054C00F0E072C0869B03C0E6E0F0E06DC0879BD4

:10055C0003C0EBE0F0E068C090989198929A939861

:10056C00849B03C0E1E0F0E05FC0859B03C0E2E048

:10057C00F0E05AC0869B03C0E3E0F0E055C0879BD7

:10058C0003C0ECE0F0E050C0909891989298939A48

:10059C00849B03C0EFE0F0E047C0859B03C0E0E024

:1005AC00F0E042C0869B03C0EEE0F0E03DC0879BCC

:1005BC0003C0EDE0F0E038C0A89AA998AA989D9BDA

:1005CC0003C0E0E1F0E030C09E9B03C0E1E1F0E04D

:1005DC002BC09F9B03C0E2E1F0E026C0A898A99A2B

:1005EC00AA989D9B03C0E3E1F0E01EC09E9B03C054

:1005FC00E4E1F0E019C09F9B03C0E5E1F0E014C01A

:10060C00A898A998AA9A9D9B03C0E6E1F0E00CC0BB

:10061C009E9B03C0E7E1F0E007C09F9B03C0E8E1AD

:10062C00F0E002C011E064CF19910895FFE0FA9553

:10063C00F1F70895A7B3AF70A7BBC19AC098F6DFC6

:10064C00C29AF4DFA6B3C298F1DFC29AEFDFC29868

:10065C00A7FDF5CF0895A07FAB2BA8BBC29A0E9433

:10066C001C03C2980E941C030895C198A7B3A76FDE

:10067C00A7BBB8B3BF70A881EEDFA881A295EBDF52

:10068C00C19A0C94FA03C29A0E941C03E6B3C29856

:10069C000E941C03E07F08950E941C03F4DFAE2F20

:1006AC00F2DFC198E295EA2B08950E942003E881BD

:1006BC00F0E0E357FE4FE081A981EA0FEA930E9434

:1006CC003B0399808880229608950E942003E2E0E3

:1006DC00EA930E943B030E942003ECE0EA930E9401

:1006EC003B030E942003E1E0EA930E943B03E0E01D

:1006FC008E2E9E2E0895EF93FF93A8816894AA30B6

:10070C0019F0E8949B1430F08394E0E0EA938A9219

:10071C00CCDF36F093948EDFC09AA881AA93A5DF24

:10072C00FF91EF910C94FA031A93A981BA81ED9180

:10073C00A983BA831E2FE03019F01A93DCDFF5CFB2

:10074C000EC01A93E981FA813196E983FA833197C5

:10075C00E4911E2FE03019F01A93CDDFF3CF1881FE

:10076C0023960895AA27BB271197F1F70895C198EE

:10077C00A7B3A76FA7BBB8B3BF70A8810E94310302

:10078C00C19A32C0C298C098B880E881E058E09312

:10079C008F01E881E054E09390010E941B080E94B5

:1007AC001B080E941B08DEDFE0E2EA93E0DFDADFE1

:1007BC00E8E20E942108E4E00E942108E5E80E949A

:1007CC002108A7B3AF70A7BBC19A0E945203E530B2

:1007DC0011F0E0E009C00E942003E6E0EA930E94D9

:1007EC003B030E946B03E1E021960895A991B99116

ادامه مطلب

تنظیم موتور استپر

شماتیک در اصرع وقت میگذارم  

Bascom Code

$regfile = "m16def.dat"
$crystal = 1000000

Config Kbd = Portb
Config Lcd = 16 * 2
Config Lcdpin = Pin , Db4 = Portc.4 , Db5 = Portc.5 , Db6 = Portc.6 , Db7 = Portc.7 , Rs = Portc.0 , E = Portc.1
Config Portd = Output
Config Porta = Input

Dim A As Byte , B As Byte , Key As Byte , C As Byte , D As Byte , E As Byte

Cls
Cursor Off

B
= 0
D
= 1

Q
:
Locate 1 , 1
Lcd "Direction:"
Locate 2 , 1
Lcd "Speed:"
Do
'************Read Keyboard
A
= Getkbd()
If A > 15 Then
  
Goto Q
Else
   Key
= Lookup(a , Dta)
    
If Key <= 9 Then
           B
= B * 10
           B
= B + Key
'*************Direction
         
If D = 0 Then Lcd B
                  
Waitms 270
              
Elseif Key = 10 Then
                  
Locate 1 , 11
                  
Lcd "Left"
                   C
= 1
                   D
= 0
                   B
= 0

              
Elseif Key = 11 Then
                 
Locate 1 , 11
                 
Lcd "Right"
                  C
= 2
                  D
= 0
                  B
= 0

ادامه مطلب

کنترل دمای فن با میکروکنترلر

شماتیک در اصرع وقت میگذارم  

Bascom Code:

'--------------------------------main-------------------------------------------
$regfile = "m16def.dat"
$crystal = 1000000
'-------------------------------lcd---------------------------------------------
'rs=pinb.6,e=pinb.0,db4=pinb.2,db5=pinb.3,db6=pinb.4,db7=pinb.5
Config Lcd = 16 * 2
Config Lcdpin = Pin , Rs = Pinb.0 , E = Pinb.1 , Db4 = Pinb.2 , Db5 = Pinb.3 , Db6 = Pinb.4 , Db7 = Pinb.5

'-------------------------------key board---------------------------------------
Config Kbd = Portc
'Use the following code to disable JTAG
Mcusr = &H80
Mcusr = &H80
'--------------------------------pwm--------------------------------------------
Config Timer1 = Pwm , Pwm = 10 , Compare A Pwm = Clear Up , Compare B Pwm = Clear Down , Prescale = 1
 
Start Timer1
 
'--------------------------------dim-------------------------------------------
 
'a,b  for keyboard, c for chek , d for pwm
 
Dim A As Word , B As Word , C As Word , D As Word , Tanzim As Byte , E As Byte
 
Dim Lop As Byte
 
Dim Dama As Byte , Lm35 As Word , Motor As Word
 
'--------------------------------adc-------------------------------------------
 
Config Adc = Single , Prescaler = Auto , Reference = Avcc
 
Start Adc
 
'--------------------------------main------------------------------------------
 
Config Pind.4 = Output
 
Config Pind.5 = Output
 
'------------------------------------------------------------------------------
               A
= 0
               B
= 0
              
Cursor Off
              
Cls
              
Locate 1 , 5
              
Lcd "Hello"
              
Wait 2
              
Cls

 Main
:
               
Locate 1 , 1
               
Lcd "Intern number    "
                
Locate 2 , 1
               
Lcd "                 "
               
Compare1a = 1
               
Compare1b = 1

ادامه مطلب

DS1820 / DS18S20 Temperature Indicator با میکروکنترلر 8515

 

شماتیک در اصرع وقت میگذارم  

'-----------------------------------------------------------------------------------------
'author                : hamed soltani
'purpose                  : DS1820 / DS18S20 Temperature Indicator
'-----------------------------------------------------------------------------------------

$regfile = "m8515.dat"                                      ' specify the used micro
$crystal = 8000000                                          ' used crystal frequency


Declare Sub Read1820

Config 1wire = Portd.7
Config Lcd = 16 * 2
Config Lcdpin = Pin , Db4 = Porta.2 , Db5 = Porta.3 , Db6 = Porta.4 , Db7 = Porta.5 , E = Porta.1 , Rs = Porta.0

Upbtn
Alias Pinb.5
Downbtn
Alias Pinb.6
Enterbtn
Alias Pinb.7
Alarm
Alias Pinc.3
Config Upbtn = Input
Config Downbtn = Input
Config Enterbtn = Input
Config Portc = Output

ادامه مطلب

Temperature Indicator با میکروکنترلر 8515

شماتیک در اصرع وقت میگذارم                                                          

'-----------------------------------------------------------------------------------------
'author                : hamed soltani
'purpose                  : DS1820 / DS18S20 Temperature Indicator
'-----------------------------------------------------------------------------------------

$regfile = "m8515.dat"                                      ' specify the used micro
$crystal = 8000000                                          ' used crystal frequency

Declare Sub Read1820

Config 1wire = Portd.7
Config Lcd = 16 * 2
Config Lcdpin = Pin , Db4 = Porta.2 , Db5 = Porta.3 , Db6 = Porta.4 , Db7 = Porta.5 , E = Porta.1 , Rs = Porta.0


'Temp variables
Dim Bd1 As Byte
Dim Bd2 As Byte
Dim Bd7 As Byte
Dim Bd8 As Byte

Dim I As Byte , Tmp As Byte
Dim T As Integer , T1 As Integer
Dim Bd(9) As Byte                                           'Scratchpad 0-8 72 bits incl CRC, explanations for DS1820
'Sc(1)  'Temperature LSB
'Sc(2) 'Temperature MSB
'Sc(3) 'TH/user byte 1 also SRAM
'Sc(4) 'TL/user byte 2 also SRAM
'Sc(5) 'config  also SRAM x R1 R0 1 1 1 1 1 - the r1 r0 are config for resolution - write FF to byte for 12 bit - others dont care
'Sc(6) 'res
'Sc(7) 'res
'Sc(8) 'res
'Sc(9) '8 CRC

'DALLAS DS1820 ROM and scratchpad commands''''''''''''''''''''''''''1wwrite....
'&H 33 read rom - single sensor
'&H CC skip rom
'&H BE read scratchpad
'&H 44 convert T

' Main loop
Cls
Cursor Off
Do
  
1wwrite &HCC : 1wwrite &H44                              ' start measure
  
Waitms 400                                               ' wait for end of conversion
   Read1820
  
Wait 1
Loop
End                                                         'end program

'Read the DS1820 by skipping the ROM checking, since we are using only 1 sensor

Sub Read1820                                                ' reads sensor ans calculate                                               ' T for 0.1 C
  
1wreset                                                  ' reset the bus
  
1wwrite &HCC                                             ' read internal RAM
  
1wwrite &HBE                                             ' read 9 data bytest
   Bd
(1) = 1wread(9)
   Bd1
= Bd(1)
   Bd2
= Bd(2)
   Bd7
= Bd(7)
   Bd8
= Bd(8)
                                              
' read bytes in array
  
1wreset                                                  ' reset the bus
      Tmp
= Bd1 And 1
     
If Tmp = 1 Then Decr Bd1                              ' 0.1C precision
          T
= Bd1
          T
= T * 50
          T
= T - 25
          T1
= Bd8 - Bd7
          T1
= T1 * 100
          T1
= T1 / Bd8
          T
= T + T1
          T1
= T / 100                                      'store tens
          T
= T Mod 100                                     'store decimal number
         
Cls
         
Locate 1 , 3
         
Lcd "Temperature"
         
Locate 2 , 7
         
Lcd T1 ; "." ; T
End Sub

End

 

پروگرامر usb با آی سی atmega8 atmega48

شماتیک در اصرع وقت قرار داده می شود

atmega 8 hex

:100000003BC07CC153C052C051C050C04FC04EC055
:100010004DC04CC04BC04AC049C048C047C046C094
:1000200045C044C043C00902120001010080190903
:10003000040000000000000012010101FF000008A0
:10004000C016DC050101010200010E03550053003A
:1000500042006100730070001C0377007700770096
:100060002E00660069007300630068006C002E00BB
:10007000640065000403090411241FBECFE5D4E029
:10008000DEBFCDBF10E0A0E6B0E0E0E3FDE002C0DF
:1000900005900D92A236B107D9F710E0A2E6B0E0C4
:1000A00001C01D92A23AB107E1F726C6A9CF1F935E
:1000B000CF93DF9360919C00662359F1635067FDF5
:1000C0006CC0C2E6D0E0C0919600CF5F20E010E89F
:1000D000809199008D3209F465C08091780087FD88
:1000E00009C0CE016AD52FEF821709F49FC0811194
:1000F00020E010E010937800922F2093610010927E
:100100009C009F3F51F486B3837089F1109279006F
:10011000E3C0909161009F3FB1F38091600084FF44
:10012000F2CF692F9930B8F5961B909361001BE4CC
:100130008091780080FD13EC8F5F80937800ACE8AD
:10014000B0E087FD60C0662309F058C060E070E051
:10015000C62F693008F446C02EE18FEF809361000E
:1001600010938B002093600086B3837079F68091A2
:100170007900882309F0B0C094E686B3837009F053
:10018000ABC09150D1F781E08093790090939D00AE
:1001900090939800A1C068E0C7CF90916100109241
:1001A0009C00AFCF683009F0A5CF8881807609F038
:1001B00056C044E950E0209394008981882309F0D7
:1001C00041C02093950022E050939B0040939A00F9
:1001D0008F81882309F08ECF8E81821708F08ACF15
:1001E000282F88CF8CE890E02CD22C2F2C5FC830A1
:1001F00008F0B6CF9FEF90936100B2CFCD01A0D4AD
:10020000682F7727A5CFE0919A00F0919B0086FF99
:1002100012C0962F03C084918D9331969150D8F7D8
:10022000F0939B00E0939A00772792CF8EE1809322
:10023000600010E05FCF962F02C081918D939150A6
:10024000E0F7EECF8530B9F08630C9F0883039F16B
:10025000893049F18A3009F0BBCF21E0B5CFCE011A
:1002600086D3282F8F3F09F0B3CF888187FF41CFF6
:100270002E8110E03FCF8A8180939D00A9CF10ECA2
:100280008B818130A1F08230B1F0833009F0A0CFB2
:100290008A818823A1F444E750E024E095CF4FE918
:1002A00050E021E091CF8A8180939F0091CF48E375
:1002B00050E022E189CF46E250E022E185CF813053
:1002C00039F0823009F084CF4AE450E02EE07CCF50
:1002D00048E550E02CE178CFDF91CF911F91089550
:1002E00082E690E0809397000B968093960085B706
:1002F000836085BF8BB780648BBF08950F930FB762
:100300000F93B09BFECFB09B06C0B09B04C0B09BC8
:1003100002C0000000C01F933F932F9331E012E012
:1003200006B3102710FD32E0102F3A95C9F700FDF3
:10033000E3C006B3102720E010FB20F9DF9316B3CB
:10034000012700FB21F9CF93C091970006B3102736
:1003500010FB22F93BE0D0E04F9316B3012700FBDE
:1003600023F94FEF000055C0B09BFECFB09B06C0F5
:10037000B09B04C0B09B02C0000000C0DF9100C071
:10038000CDCF16B3137079F14F7D206213C006B341
:10039000037049F14F7B206415C0037021F1102FC9
:1003A000206806B319C006B30370E9F04E7F2160E0
:1003B00018C039F306B30370B1F0102710FB26F90B
:1003C000223028F316B3012700FB27F9422749936F
:1003D0004FEF06B3243008F3102710FB20F9297FD4
:1003E00011F316B31370E1F1012700FB21F9237F0C
:1003F000F1F006B30370A1F1102710FB22F9277E5C
:10040000E1F016B3012700FB23F93A9541F12F7C67
:10041000D1F006B3037021F1102710FB24F92F79D6
:10042000C1F016B3012700FB25F92F73C2CF16B315
:100430001370B1F04D7F2260DCCF06B3037081F002
:100440004B7F2460DECF16B3137051F0477F2860D6
:10045000E0CF06B3037021F04F7E2061E2CF3BC0B6
:100460003C2FC09197003C1B00E433300ABF98F149
:1004700008811981412F1F77209198000D3279F161
:10048000013E69F10936C1F00777033421F5109177
:100490009E00112301F100919C000030C1F5343021
:1004A000C2F130939C001093990000919600C09384
:1004B0009600009397002DC0121769F430916000E8
:1004C00034FD23C00AE500936000CBE8D0E025C0EE
:1004D000002700939E004F91CF91DF910DC012171E
:1004E000B9F700939E000AE5009360004F91CF9109
:1004F0000AB706FD39CFDF9100E40ABF2F913F9183
:100500001F910F910FBF0F911895432F03C04AE51C
:1005100001C042EDC4E1D0E032E05F9353E0C09A05
:1005200008B3B89AB99A20E80FC0052710E008BBB5
:1005300010C0052710E0089408BB13C0052710E081
:1005400015C0052710E019C020FF052708BB279517
:1005500017951C3F50F720FF0527279508BB1795D7
:100560001C3F38F720FF05272795179508BB1C3F30
:1005700028F720FF0527279517951C3F08BB08F78C
:1005800000C0499120FF052708BB279517951C3F00
:1005900080F520FF0527279508BB17951C3F68F5B8
:1005A00020FF05272795179508BB1C3F58F520FF0E
:1005B0000527279517951C3F08BB38F5242F3A953A
:1005C00019F60C7F5F9108BB32E03A95F1F7109174
:1005D0009D00C651D04011F010939800016017B3F0
:1005E0001C7F08BB0C7F4F91CF9117BB08BBDF91DD
:1005F00083CF052710E008BBCACF052710E0089479
:1006000008BBCDCF052710E0CFCF052710E0D3CF13
:10061000A82FB92F8FEF9FEF41E050EA615070F0A3
:100620002D9138E0722F782796958795269570FF43
:1006300002C0842795273A95A9F7F0CF8095909529
:100640000895E6DF8D939D93089582E58DB981E04D
:100650008EB90895882339F48BE593E09093A10037
:100660008093A000089588E793E09093A100809381
:10067000A000089592B782B7891B8C30E0F30895EB
:1006800087B38C6287BBC298C598F4DFC29AF2DF49
:10069000C2988091A0009091A1008857934009F0E2
:1006A0000895D3DF089587B3837D87BB88B3837DA7
:1006B00088BB1DB808950F931F93CF93C82F00E0F8
:1006C00017E00CC0C398CC0F000FB4990F5FC59A08
:1006D000D1DFC598CFDF115017FD04C0C7FFF2CF9F
:1006E000C39AF1CF802F9927CF911F910F91089531
:1006F0008FB9779BFECF8FB1992708951F93CF9322
:10070000CFE103C0C150CF3F51F1E091A000F09183
:10071000A1008CEA0995E091A000F091A10083E589
:100720000995E091A000F091A10080E00995182FB3
:10073000E091A000F091A10080E00995133591F0BF
:100740001DB8C59A97DFC59895DF8091A00090915C
:10075000A10088579340B1F678DFC150B0F681E030
:1007600090E002C080E090E0CF911F9108950F9338
:100770001F938C018170880F880F880FE091A00073
:10078000F091A10080620995C801892F992786956B
:10079000E091A000F091A100099516950795E091D0
:1007A000A000F091A100802F0995E091A000F091A8
:1007B000A10080E0099599271F910F9108950F934B
:1007C0001F93CF93DF93EC01062F142F8170880FB6
:1007D000880F880FE091A000F091A1008064099536
:1007E000CE01892F99278695E091A000F091A10074
:1007F0000995CE0196958795E091A000F091A10012
:100800000995E091A000F091A100802F0995112396
:10081000A9F00F3789F01EE102B7CE01A8DF8F37AC
:1008200069F482B7801B8D3310F002B71150112389
:10083000A1F781E090E004C08FE08CD080E090E0F0
:10084000DF91CF911F910F9108950F931F93CF9335
:10085000DF93EC01162FE091A000F091A1008CE451
:100860000995CE01892F99278695E091A000F091F6
:10087000A1000995CE0196958795E091A000F09191
:10088000A1000995E091A000F091A10080E00995F8
:100890001F3F89F01EE102B7CE0169DF8F3F69F487
:1008A00082B7801B8D3310F002B711501123A1F7CE
:1008B00081E090E004C08FE04DD080E090E0DF91D7
:1008C000CF911F910F9108950F931F938C01E09189
:1008D000A000F091A10080EA0995812F9927E0916D
:1008E000A000F091A1000995E091A000F091A10075
:1008F000802F0995E091A000F091A10080E009957A
:1009000099271F910F910895FF920F931F938C01C8
:10091000F62EE091A000F091A10080EC0995812FC6
:100920009927E091A000F091A1000995E091A00025
:10093000F091A100802F0995E091A000F091A10015
:100940008F2D09958EE106D080E090E01F910F91E8
:10095000FF900895382F20E0231740F492B782B714
:10096000891B8C33E0F32F5F2317C0F308951F9387
:10097000CF93DF93EC0110E089818130A1F08230C8
:1009800009F489C0833009F489C0843091F087303C
:1009900009F467C0853009F4C3C0863039F1883066
:1009A00009F0C2C09DC09A9B812F54DE69DEA998D0
:1009B000BBC08B819927982F88272A813327822BC8
:1009C000932B90938600809385008F819927982F91
:1009D00088272E813327822B932B90937B00809343
:1009E0007A0082E080937C001FEF9EC08B81992764
:1009F000982F88272A813327822B932B9093860068
:100A0000809385008C81482F552750938800409310
:100A100087002D812F70209389008D819927807FF9
:100A2000907082959295907F9827807F9827840F69
:100A3000951F909388008093870020FF04C08091C9
:100A4000870080938A008F819927982F88272E818D
:100A50003327822B932B90937B0080937A0081E045
:100A6000C1CF8B819927982F88272A813327822B02
:100A7000932B90938600809385008F819927982FE0
:100A800088272E813327822B932B90937B00809392
:100A90007A0083E0A7CF07DEA99A46C0E091A000C4
:100AA000F091A1008A81099580937D00E091A000DA
:100AB000F091A1008B81099580937E00E091A000C8
:100AC000F091A1008C81099580937F00E091A000B6
:100AD000F091A1008D8109958093800014E024C0DD
:100AE0008B819927982F88272A813327822B932B54
:100AF0009093860080938500109288001092870062
:100B0000109389008F819927982F88272E8133276A
:100B1000822B932B90937B0080937A0084E062CFAA
:100B2000EDDD80937D0011E08DE790E090939B00D8
:100B300080939A00812F9927DF91CF911F9108957B
:100B4000EF92FF921F93CF937C01162F90917C0020
:100B5000892F8250823050F5C0E0C617C0F01FC008
:100B60008091850090918600AFDEF701EC0FF11DBA
:100B700080838091850090918600019690938600F5
:100B800080938500CF5FC11750F490917C00923024
:100B900039F78091850090918600E9DDE6CF183025
:100BA00010F410927C00812F992702C08FEF90E003
:100BB000CF911F91FF90EF900895BF92CF92DF9257
:100BC000EF92FF920F931F93CF93DF936C01E62E6A
:100BD000BB2440917C00413019F0443009F080C0C2
:100BE000FF24FE1408F079C0413009F049C080911B
:100BF000870090918800892B09F04EC0CF2DDD270A
:100C0000F601EC0FFD1F60818091850090918600B8
:100C1000D6DD80917A0090917B00019790937B00C4
:100C200080937A00892BD9F410927C0080918900FE
:100C300081FF13C080918A00282F3327809187007D
:100C4000909188002817390741F0CC0DDD1D68818F
:100C50008091850090918600F8DDC1E0BC2E8091E6
:100C60008500909186000196909386008093850080
:100C7000F394FE1490F540917C00413009F4B7CF15
:100C8000CF2DDD27F601EC0FFD1F608180918500DF
:100C90009091860039DEBDCFCF2DDD2786010C0F68
:100CA0001D1F40E0F80160818091850090918600D1
:100CB00086DD80918A00815080938A00882309F024
:100CC000A8CFF80160818091850090918600BDDDFC
:100CD0008091870080938A009CCF8B2D992702C03A
:100CE0008FEF90E0DF91CF911F910F91FF90EF90E8
:100CF000DF90CF90BF900895CFE5D4E0DEBFCDBFA9
:100D000012BA18BA8BEF81BB8FEF87BB90E091507E
:100D1000F1F78150D9F787BB93E094BB8EEF85BB89
:100D200093BF81E097DCDCDA7894C1D9C0D9FDCFDC
:020D30005AFF68
:00000001FF

ادامه مطلب

رقص نور با میکروکنترلر ATTiny2313

شماتیک در اصرع وقت قرار داده می شود

;***** Fading/Running LED  ********************
; Last updated  : 31-12-2006
; Author  : hamed soltani 
; Target  : ATTiny2313
; Hardware  : 15 LEDs @ port B & D
; Description : This program displays 5 fading LED patterns and 3 running LED patterns
; Project nr : DT0702    :
;**********************************************

.include "tn2313def.inc"

.def temp   =r16
.def PWM    =r17
.def fade   =r18
.def ledb   =r19
.def ledd   =r20
.def seq  =r21


rjmp main
nop
nop
nop
nop
nop
nop      ; Timer0 interupt vector

 

main:

ldi r16,low(RAMEND)
out SPL,r16

clr PWM

main_loop:
clr temp
out ddrb,temp   ; set portb as input
ser temp
sbic pinb,0x00   ; check portb.0
rcall set_seq
 loop_1: cpi seq,0
   breq fade1
   cpi seq,1
   breq fade2
   cpi seq,2
   breq fade3
   cpi seq,3
   breq fade4
   cpi seq,4
   breq fade5
   cpi seq,5
   breq fade6
   cpi seq,6
   breq fade7
   cpi seq,7
   breq fade8
rjmp main_loop

fade1:
rcall set_ports
fade1_loop:
rcall fade_1
dec r22
brne fade1_loop
dec r23
brne fade1_loop
rjmp main_loop


fade2:
rcall set_ports
fade2_loop:
rcall fade_2
dec r22
brne fade2_loop
dec r23
brne fade2_loop
rjmp main_loop


fade3:
ldi temp,255
out DDRB,temp
out DDRD,temp
ldi r22,255
ldi r23,20
fade3_loop:
rcall fade_3
dec r22
brne fade3_loop
dec r23
brne fade3_loop
rjmp main_loop


fade4:
ldi temp,255
out DDRB,temp
out DDRD,temp
ldi r22,255
ldi r23,20
fade4_loop:
rcall fade_4
dec r22
brne fade4_loop
dec r23
brne fade4_loop
rjmp main_loop

fade5:
ldi temp,255
out DDRB,temp
out DDRD,temp
ldi r22,255
ldi r23,20
fade5_loop:
rcall fade_5
dec r22
brne fade5_loop
dec r23
brne fade5_loop
rjmp main_loop

fade6:
rcall set_ports
rcall fade_6
rjmp main_loop

fade7:
ldi temp,255
out DDRB,temp
out DDRD,temp
rcall fade_7
rjmp main_loop

fade8:
ldi temp,255
out DDRB,temp
out DDRD,temp
rcall fade_8
rjmp main_loop


;*********************************************************

fade_1:
   ldi fade,1
   ldi ledb,1
   ldi ledd,64
fade_1_loop:
   rcall PWM_loop
   inc fade
   inc fade
   lsl ledb
   lsr ledd
   tst ledb
   brne fade_1_loop
   ldi ledb,1
   ldi ledd,64
   ldi fade,1
   ret 

fade_2:
   ldi fade,16
   ldi ledb,1
   ldi ledd,64
fade_2_loop:
   rcall PWM_loop
   dec fade
   dec fade
   lsl ledb
   lsr ledd
   tst ledb
   brne fade_2_loop
   ldi ledb,1
   ldi ledd,64
   ldi fade,16
   ret

fade_3:
   ldi fade,1
   ldi ledb,1
   ldi ledd,0
fade_3_loop:
   rcall PWM_loop
   inc fade
   lsl ledb
   tst ledb
   brne fade_3_loop
   ldi ledd,1
loop_3b: rcall PWM_loop
   inc fade 
   lsl ledd
   tst ledd
   brne loop_3b
   ldi ledb,1
   ldi ledd,0
   ldi fade,1
   ret

fade_4:
   ldi fade,15
   ldi ledb,1
   ldi ledd,0
fade_4_loop:
   rcall PWM_loop
   dec fade
   lsl ledb
   tst ledb
   brne fade_4_loop
   ldi ledd,1
loop_4b: rcall PWM_loop
   dec fade 
   lsl ledd
   tst ledd
   brne loop_4b
   ldi ledb,1
   ldi ledd,0
   ldi fade,15
   ret

fade_5:
   ldi fade,15
   ldi ledb,1
   ldi ledd,0
fade_5_loop:
   rcall PWM_loop
   lsl ledb
   tst ledb
   brne fade_5_loop
   ldi ledd,1
loop_5b: rcall PWM_loop
   lsl ledd
   tst ledd
   brne loop_5b
   ldi ledb,1
   ldi ledd,0
   ldi fade,15
   ret

; 1 led running loop
fade_6:
ldi temp,0
out portd,temp
rcall delay_100
ldi temp,1
out portb,temp
rcall delay_100
ldi temp,2
out portb,temp
rcall delay_100
ldi temp,4
out portb,temp
rcall delay_100
ldi temp,8
out portb,temp
rcall delay_100
ldi temp,16
out portb,temp
rcall delay_100
ldi temp,32
out portb,temp
rcall delay_100
ldi temp,64
out portb,temp
rcall delay_100
ldi temp,128
out portb,temp
rcall delay_100

ldi temp,1
out portd,temp
ldi temp,0
out portb,temp
rcall delay_100
ldi temp,2
out portd,temp
rcall delay_100
ldi temp,4
out portd,temp
rcall delay_100
ldi temp,8
out portd,temp
rcall delay_100
ldi temp,16
out portd,temp
rcall delay_100
ldi temp,32
out portd,temp
rcall delay_100
ldi temp,64
out portd,temp
rcall delay_100
ldi temp,0
out portd,temp
ret


; 3 led running
fade_7:
ldi temp,1
out portb,temp
ldi temp,0
out portd,temp
rcall delay_100

ldi temp,3
out portb,temp
rcall delay_100

ldi temp,7
out portb,temp
rcall delay_100

ldi temp,14
out portb,temp
rcall delay_100

ldi temp,56
out portb,temp
rcall delay_100

ldi temp,112
out portb,temp
rcall delay_100

ldi temp,224
out portb,temp
rcall delay_100

ldi temp,192
out portb,temp
ldi temp,1
out portd,temp
rcall delay_100

ldi temp,128
out portb,temp
ldi temp,3
out portd,temp
rcall delay_100

ldi temp,0
out portb,temp
ldi temp,14
out portd,temp
rcall delay_100

ldi temp,28
out portd,temp
rcall delay_100

ldi temp,56
out portd,temp
rcall delay_100

ldi temp,112
out portd,temp
rcall delay_100

ldi temp,96
out portd,temp
rcall delay_100

ldi temp,64
out portd,temp
rcall delay_100
ret

; ************* 5 led running ***************************************
fade_8:
ldi temp,1
out portb,temp
ldi temp,0
out portd,temp
rcall delay_100

ldi temp,3
out portb,temp
ldi temp,0
out portd,temp
rcall delay_100

ldi temp,7
out portb,temp
ldi temp,0
out portd,temp
rcall delay_100

ldi temp,15
out portb,temp
ldi temp,0
out portd,temp
rcall delay_100

ldi temp,31
out portb,temp
ldi temp,0
out portd,temp
rcall delay_100

ldi temp,62
out portb,temp
ldi temp,0
out portd,temp
rcall delay_100

ldi temp,124
out portb,temp
ldi temp,0
out portd,temp
rcall delay_100

ldi temp,248
out portb,temp
ldi temp,0
out portd,temp
rcall delay_100

ldi temp,240
out portb,temp
ldi temp,1
out portd,temp
rcall delay_100

ldi temp,224
out portb,temp
ldi temp,3
out portd,temp
rcall delay_100

ldi temp,192
out portb,temp
ldi temp,7
out portd,temp
rcall delay_100

ldi temp,128
out portb,temp
ldi temp,15
out portd,temp
rcall delay_100

ldi temp,0
out portb,temp
ldi temp,31
out portd,temp
rcall delay_100

ldi temp,0
out portb,temp
ldi temp,62
out portd,temp
rcall delay_100

ldi temp,0
out portb,temp
ldi temp,124
out portd,temp
rcall delay_100

ldi temp,0
out portb,temp
ldi temp,120
out portd,temp
rcall delay_100

ldi temp,0
out portb,temp
ldi temp,112
out portd,temp
rcall delay_100

ldi temp,0
out portb,temp
ldi temp,96
out portd,temp
rcall delay_100

ldi temp,0
out portb,temp
ldi temp,64
out portd,temp
rcall delay_100

ret

;****************************************************************
   
PWM_loop:
  
loop_t:
  cp  PWM,fade
  brlo LED_aan
  clr temp    ;LED uit
  out portb,temp
  out portd,temp
  rjmp eind
LED_aan:       ;LED aan
  out portb,ledb
  out portd,ledd
eind: 
  inc PWM
  cpi PWM,16    ;16 step PWM
  brne loop_t
  clr PWM
  ret
;================================================================

;****************************************************************
set_seq:
inc seq
cpi seq,8
brne set_seq_end
ldi seq,0
set_seq_end:
ret
;================================================================

;*****************************************************************
delay_100:
          ldi  R22, $97
WGLOOP0:  ldi  R23, $06
WGLOOP1:  ldi  R24, $92
WGLOOP2:  dec  R24
          brne WGLOOP2
          dec  R23
          brne WGLOOP1
          dec  R22
          brne WGLOOP0
          nop
    ret
;=================================================================

;*****************************************************************
set_ports:
ldi temp,255
out DDRB,temp
out DDRD,temp
ldi r22,255
ldi r23,40
ret
;=================================================================

ادامه مطلب

رقص نور با میکروکنترلر 8515

 

 

 

'-----------------------------------------------------------------------------------------
'author                : hamed soltani

'purpose                  : LED Blinking on Port A
'-----------------------------------------------------------------------------------------

$regfile = "m8515.dat"                                      ' specify the used micro
$crystal = 8000000                                          ' used crystal frequency

Leds Alias Porta                                            'Define name
Config Porta = Output                                       'Config Port A as output

Do
Leds = &HFF                                                 'switch off all LEDS
Wait 1                                                      'wait 1 second
Leds = 00                                                   'switch on all LEDs
Wait 1                                                      'wait 1 second
Loop
                                                           'unconditional loop
End

 

 

پروب منطقی دیجیتالی

upsara

دیمر با 555

upsara

رقص نووووور با LDR

upsara

پروژه رایگان پروب منطقی 1

upsara

جعبه موسیقی

upsara

ساعت دیجیتال با 8051 به همراه برنامه و بلوک دیاگرام

upsara

ادامه مطلب

مبدل DSB RF

upsaraupsara

ادامه مطلب

 
  • تعداد صفحات :3
  • 1  
  • 2  
  • 3  
 

درباره وبلاگ

با سلام حامد سلطانی هستم دانشجوی الکترونیک در این وبلاگ سعی شده به مداراتی کابردی بپردازم و دانشجویانی که دنبال پروژه هستند

مدیر وبلاگ : شماره تماس سفارش 09371904246 09193383027

آخرین پست ها

جستجو

نویسنده



ساعت فلش

مترجم سایت

آپلود عكس

كد عكس تصادفی

كد عكس تصادفی

چت روم



برای نمایش تصاویر گالری كلیك كنید


دریافت كد گالری عكس در وب



كد آهنگ




free counters