logo elektroda
logo elektroda
X
logo elektroda
REKLAMA
REKLAMA
Adblock/uBlockOrigin/AdGuard mogą powodować znikanie niektórych postów z powodu nowej reguły.

Programowanie ATTiny w Bascom: Wybór modelu i konfiguracja pinów

DJ_DOGGY 06 Kwi 2015 23:24 1713 6
REKLAMA
  • #1 14596201
    DJ_DOGGY
    Poziom 10  
    Programowanie ATTiny w Bascom: Wybór modelu i konfiguracja pinów

    Sorry for only english .
    Here is a ATTiny connected as the above schematic. Clock must be the internal clock. Datasheet says 4.8/9.6MHz . I think 4.8 is enough.
    I want help for a program in Bascom .I see that ATTiny13 is not the perfect one for the task .
    May be ATTiny25 or ATTiny45 will be good .

    The things are :
    PIN1 default 0
    REF is a voltage external reference manually set (acting as GATE).


    If the "Y" > REF -> LED1 ON -> PIN1 ON (relay on)

    If PIN2 is >2.2V -> LED2 ON ->PIN1 ON (relay on)


    Thanks to all that can help for the program.
  • REKLAMA
  • Pomocny post
    #2 14596908
    Konto nie istnieje
    Konto nie istnieje  
  • REKLAMA
  • #3 14598006
    DJ_DOGGY
    Poziom 10  
    It have problem with Relay . It`s always ON nevermind what conditions are met.

    Leds working as they should be.
  • REKLAMA
  • #4 14598059
    Konto nie istnieje
    Konto nie istnieje  
  • REKLAMA
  • #5 14598083
    DJ_DOGGY
    Poziom 10  
    Yes, for the schematic .
    Saw the bit for External reset .I programmed it right and all is OK now.
    And now working as should be .

    Thanks for your efforts.

    Schematic was edited because i was thinking that 13 is not compatible with what i want.
    But looks like it works :)

    I simulaed in Proteus . Good program for such need.

    Dodano po 10 [minuty]:

    you mean i`ll need this for reprograming ?

    http://www.mikrocontroller.net/topic/42933
  • #6 14598129
    yokoon
    Poziom 29  
    niveasoft napisał:
    Simple how it`s look but should work ;)
    Set Freq manually but 1,2MHz is a oryginal value

    Kod: text
    Zaloguj się, aby zobaczyć kod


    PortB w Attinie13 nie posiada 8 pinów.
  • #7 14642095
    DJ_DOGGY
    Poziom 10  
    niveasoft ,

    Can you tell me if these fuses are the right for the program ?
    The RSTDisbl and SPIEN are greyed out but i manipulated the image with the "checkbox" . I think this is because i don`t have programmer connected to the ponyprog . But it will be.
    Programowanie ATTiny w Bascom: Wybór modelu i konfiguracja pinów

    Is there any other fuses to be checked ? CKSEL fuses may not be checked because default clock for Attiny13 is 9.6MHz , and CKDIV8 is enough ?
REKLAMA