Wednesday, December 29, 2010

WAY TO DOWNLOAD VIDEO FROM YOUTUBE USING LINUX

It seems easy to download video from youtube when we use windows but for linux it is some what hard,,but there is solution of many problem in internet.

We use terminal in linux  to download video from youtube and it's URL.Here is some method ,,

sudo apt-get install youtube-dl
youtube-dl  http://www.youtube.com/video/url/ 
But some time we find like this problem..

Ubuntu ForumsRetrieving video webpage... done.
Extracting URL "t" parameter... failed.
Error: unable to extract URL "t" parameter.
Try again several times. It may be a temporary problem.
Other typical problems:

* Video no longer exists.

* Video requires age confirmation but you did not provide an account.
* You provided the account data, but it is not valid.
* The connection was cut suddenly for some reason.
* YouTube changed their system, and the program no longer works.


It may be due to mistake in URL  or most probably due to not updted youtube-dl which is requires for download.
You can update it by either


sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install youtube-dl
Or 
manually download the .deb files if you want.
 
and than follwing aagin the above mentioned command..
Have once download...

Monday, December 13, 2010

Solution for :Unable to formatting Flash drive (RAW format)

If u r not able to format ur flash drive  using windows ,than check it's properties..and find some conclusion.
It may be seen like as..

 
We can can conclude from it that file system of flash drive has been changed,,
Now try to format it using CMD(Command Prompt) ..
But   when this case happen to me I was unable to format using CMD.Than I tried from disk management option available in computer management which we use while partition of our  hard drive.There I saw that flash drive was as unallocated volume ,than I right clicked on it where I got option at top  of making new volume as when we get  at time of partiton of our drive after it get's unallocated .(Formatting option of here may not work),Than dialogue box will be shown,.go on selecting FAT format and ur removale drive wil be in usable format..

Best of luck..
For any query please comment


Assembly language Programm for Interfacing LM35 with 8051controller using ADC0808

Temperature of surrounding is sensed by temperature sensor and it send it's o/p as DC voltage to Analog to digital Converter 0808 through which we give 8 bit value of that voltage to microcontrller 8051.After it's processing it is displayed in LCD ...

ASSEMBLY   LANGUAGE     PROGRAM FOR

                        WEATHER   MONITORING  SYSTEM


                   USING:: 1. MICROCONTROLLER  89C61X2
                                   2.ADC 0808
                               3. TEMPERATURE SENSOR LM35D
;================================================= ==============;

org 0000h
BEGIN:
mov A,#38h                                                ;initialie 2 line LCD
ACALL command
mov A,#0ch                                                  ;LCD on cursor off
ACALL command
mov A,#01h                                                 ;clear LCD
ACALL command
mov A,#06h                                                 ;Shift cursor right
ACALL command
mov A,#'T'
ACALL DISPLY
mov A,#'E'
ACALL DISPLY
mov A,#'M'
ACALL DISPLY
mov A,#'P'            

ACALL DISPLY
mov A,#'='
ACALL DISPLY
 ACALL ADC
ACALL BINTOASC
;;;;;;;;;;;;;;;;;;;;;DISPLAY ASCII NUMBERS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
mov A,#06h                                                         ;Shift cursor right
ACALL command
mov A,34h                                                        ;Disply MSb of ASCII
ACALL DISPLY
mov A,#06h                                                      ;Shift cursor right
ACALL command
mov A,33h                                                       ;Display middle ASCII
ACALL DISPLY
mov A,#06h                                                     ;Shift cursor right
ACALL command
mov A,32h                                                       ;DISPLAY LSb ASCII
ACALL DISPLY
mov A,#'d'
ACALL DISPLY
mov A,#'C'
ACALL DISPLY
acall delay
acall delay
acall dac                                    ;for analog conversion;;;;
acall delay
sjmp BEGIN                               ;Jump to the top repeat the whole process
;;;;;;;;;;;;;;;;;;;TO INITIALIZE LCD BY;;;;;;;;;;;;;;;;;;;

command:
ACALL READY                                   ;Is LCD ready
mov p0,A                                             ;Issu command
clr p2.7                                           ;RS=0 for comand instruction
clr p2.6                                          ;R/W=0 to write LCD
setb p2.5                                        ;H->L for to latch information in at data lines
clr p2.5
ret
;;;;;;;;;;;;;;;;;;TO DISPLAY USER DATA;;;;;;;;;;;;;;;;;;;;;
DISPLY:
ACALL READY
mov p0,A                                      ;Issu data
setb p2.7                                       ;RS=1 for data
clr p2.6                                         ;R/W=0 to write LCD
setb p2.5                                     ;H->L for to latch information in at data lines
clr p2.5
ret
;;;;;;;;;;;;;;;;;TO CHECK LCD READY TO RECIEVE DATA TO SHOW;;;;;;;;;;;;;;;;;;;;;;;;;
READY:
setb p0.7
clr p2.7                                                ;RS=0 for command register
setb p2.6                                             ;R/W=1 to read command register
BACK:
clr p2.5                                              ;H->L to latch the data
setb p2.5
jb p0.7,BACK                                 ;Busy flag(P1.7)=1 indicates LCD is not ready to recieve data
ret
;;;;;;;;;;;;;;;;;;;;;;;;;;READS ADC DATA;;;;;;;;;;;;;;;;;;;;;;
ADC:
mov p1,#0ffh                                  ; taking port p1 As data input port
clr p3.2                                                    ;L->H for ALE enable
clr p3.5                                                    ;clr sc
setb p3.3                                                     ; for eoc
setb p3.2                                                     ; for ale
clr p3.4                                                         ;oe pin
clr p3..2
setb p3.5                                                          ;SC=1->0
nop
clr p3.5                                                  ;H->L to start conversion
WAIT:
JB p3.3,WAIT                                         ;Wait for end of conversion EOC
 setb p3.4                                              ;OE 1->0 to enable output from ADC
acall delay
mov A,p1                                                       ;Read data
MOV 35H,A
setb p3.4                                                  ;To disable read to start next conversion
setb p3.3                                                    ;eoc
ret
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;BINARY TO ASCII CONVERSION;;;;;;;;;;;;;;;
BINTOASC:
mov A,35h                                                          ;Input from ADC
mov B,#10                                                           ;Divide by 10
div AB
mov r0,B                                                              ;Move remainder into R0
mov B,#10
div AB                                                                   ;Divide quatient by 10
mov r1,b                                                              ;Move remainder in R1
mov r2,A                                                              ;Move quatient in R2
mov A,r1                                                              ;Move second BBCD in A
swap A
orl A,r0                                            ;OR 3rd & 2nd BCD to form compact BCD
mov 30h,A                                       ;Saves 2nd&3rd BCD at RAM location 30h
mov 31h,r2                                         ;Saves 1st BCD at RAM location 31
;;;;;;;;;;;;;;;;;;;;;;;;;;CONVERTION FROM BCD TO ASCII;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
mov A,30h                                     ;Takes 2nd&3rd BCD from RAM location 30h
ANL A,#0fh                                           ;Mask the upper NIBBLE
orl A,#30h                                              ;Convert lower nibble in ASCII
mov 32h,A                                       ;Save MSb ASCII at RAM location 32H
mov A,30h                                       ;Move BCD into A from RAM location 30H
anl A,#0f0h                                         ;Mask lower NIBBLE of BCD
swap A                                            ;Interchange lower and higher NIBBLE
orl A,#30h                                            ;Convert it in ASCII
mov 33h,A                                          ;Save 2nd ASCII at RAM location 33H
mov A,31h                                        ;Takes 1st BCD from RAM location 31H
anl A,#0fh                                           ;Masks upper nibble
orl A,#30h                                           ;COnvert into ASCII
mov 34h,A                                        ;Saves MSb ASCII at RAM location 34H
ret
;;;;;;;converting data into analog form again;;;;;;;;;;;;;
dac:
    mov a,35h
                mov p1,#00h                                   ;port p1 as o/p port
                setb p3.7                                             ;dac write pin
                acall delay
                mov p1,a
                acall delay
                 ;clr p3.7
                 ret
;;;;;;;dealay required for program;;;;;
DELAY:   mov r0,#255
  loop1:    mov r1,#255
                  LOOP:djnz r1,loop
            djnz r0,loop1
  ret

end