Saturday, February 23, 2019

pic 12f508 led blinking

pic 12f508 LED Blinking

 PIC 12F508 is a baseline PIC from Microchip Corporation. 

pic 12f508 consist of 8 pins, 5pins can be used for general purposes. how ever the 5th pin (GP2) can only use as a output. 1st pin is 5v+ and 8th pin is GND then the 4th pin is MCLR. 4th pin can be configured to use as a output put once programmed as so, will need a high voltage programmer to reprogram the chip again.

blinking program :

list p=12f508
include “p12f508.inc”
__config 0xFFFE


org 0
movlw 0x08
tris 0x06
movlw 0xDF
option
movlw 0xFF
movwf OSCCAL
START
clrf GPIO
M movlw 0xFF
movwf GPIO
call DELAY
clrf GPIO
call DELAY
goto M
DELAY
movlw 0xFF
movlw 0x10
DELAY1
decfsz 0x10,1
goto DELAY1
decfsz 0x12,1
goto DELAY1
retlw 0
END

-------------------------------------------------------------------

circuit :

 






 

Sunday, February 17, 2019

Attiny85 - Arduino IDE

How to Add ATTiny85 to Arduino IDE.



                                                       8    7     6     5

                                                      |     |     |     |
                                                    _____________
                                                   |                        |
                                                   |                        |
                                                   |  ATTiny85   |
                                                   |                        |
                                                   |____________|
                                                      |     |     |     |

                                                       1    2    3      4                    


step 1 : go to : https://www.arduino.cc/en/main/software  and grab a copy of arduino IDE that suits
            to your computer processor architecture and windows platform.

step 2 : after installation,open arduino IDE, file > preferences and in additional board manager
              URLs : and copy <> past this link :

https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json

step 3 : click ok, and in tools  >  board  >  manager, install: attiny and close arduino IDE.

step 4 : head over to this https://protostack.com.au/2015/01/usbasp-windows-driver-version-3-0-7/      great site and download > install this driver for usb asp. (this driver is signed and , you don't have to a around to install.)

step 5 : open arduino IDE and go to tools > board > and scroll it down a little until you see
           ATtiny 25/45/85 and select that. (tools > board >  ATtiny 25/45/85 ).

now the arduino IDE is suitable to write codes to attiny85 chip.