Dieu Khiển thiet bi bằng Rômte Tv,các loại rômte
Chào Các anh các Bạn!
các anh các bạn giúp mình với,Mình cần mạch diều khiển dùng Rômte TV hoặc các loại rômte Khác để điểu khiển các thiết bị nhưng tìm hoài ma không thấy,các anh các bạn nào có làm ơn load cho mình với. Mong các anh va cac bạn giúp đỡ!!! Hà Vũ Hoàng |
Mỗi loại remote mã hóa dùng một con khác nhau, bạn muốn dùng loại remote nào thì mua remote đó về, tháo ra coi các con linh kiện chính bên trong đó là con gì, sau đó lên mạng tìm datasheet. Nó sẽ có một cặp mã hóa và giải mã thường đi kèm với nhau.
Bạn phải nói con đó là con nào thì anh em mới giúp được. Lâu rồi F không còn nhớ tên các cặp thông dụng, nhưng mà nhiều anh em ở đây nhớ lắm đấy. Chúc vui |
sai rồi anh F ơi
1 Attachment(s)
các loại remote TV,... ngoại trừ đầu đĩa.dều dùng kỹ thuật mã hóa Manchester ,bạn có thể dể dàng dọc dược mã bằng cách dùng vi dk ,PIC chẳng hạn.
đọc kỹ cái này nhé,nó hướng dẫn khá chi tiết RC5 TRANSMISSION PROTOCOL To ensure immunity to interference from other IR sources such as the sun, lamps and IR sound trans-missions (to headphones), bi-phase encoding (also called Manchester encoding) is used for RC5 code words. As shown in figure 2 each bi-phase encoded bit is a symbol comprising two logic levels with a tran-sition in the middle. As shown in figure 3, the bi-phase code words modu-late a 36 kHz carrier, before being transmitted via the IR LED. Since the repetition period of the 36 kHz car-rier is 27.778 us and the duty factor is 25 %, the car-rier pulse duration is 6.944 us. Because the high part of each bit of the RC5 code word contains 32 carrier pulses, 1 bit period is 64 x 27.778 us = 1.778 ms. A complete RC5 code word contains 14 bits, so it takes 24.889 ms to transmit. Each 14 bit RC5 code word consists of: § a field bit (F) which denotes command codes 0 to 63 or 64 to 127 § a control bit (C) which toggles after each key re-lease and initiates a new transmission § five system address bits for selecting one of 32 possible systems § six command bits representing one of the 128 possible RC5 commands SOFTWARE Main loop (see figure 4) After initialisation of the hardware, the four scan-lines (port pins P1.0-3) are pulled low and the LPC76x is forced into power down mode. If one of the 16 keys is pressed a keyboard interrupt will be generated and the micro will wake up from power down mode. The main program checks for a valid key hit. Next, the control bit (C) of the system byte is set or reset. After that, a routine is called for sending out the key info as an RC5 code word. Fi-nally power down mode is entered again, waiting to wake up at the next keyboard or watchdog interrupt. |
à quên
tui dã làm rồi nhưng trên 89,ko phải trên pic ,nếu bạn muốn làm ,tui cho mã nguồn & chemas:)
|
Trích:
Như vậy diễn đàn Pic sẽ ngày càng phát triển vì những ứng dụng cho 89 thì nhiều vô kể. |
cái này lúc trước tui có làm rồi nhưng dùng 89. Theo tìm hiểu của tui lúc đó thì mặc dù có rất nhiều loại remote của nhiều hãng nhưng cũng chỉ có 3 kiểu mã hóa thôi. RC5 mà minhtienbk đề cập là một loại đó. Lúc đó tui đã dùng vdk(89) nhận được cả 3 loại trên. Tài liệu tui down về cũng nhiều lắm nếu bạn cần thì tui sẽ tìm lại và gởi cho.
|
Trích:
Thanks. |
chào các bạn, minh tên là Huyện. minh đang làm Đồ Án tên "điều khiển thiết bị bằng remote tivi", nhưng minh mới bước đầu tìm hiểu, nếu bạn nào biết thì xin giúp mình, mình xin cảm ơn!mail mình là huyendta@yahoo.com
đọc bài thấy bạn mickey79 ạn có thể cho mình xin tài liệu đó được ko?minh cám ơn bạn nhiều!! |
cái này mình đã làm với pic 16f877a.để làm được ban đàu bạn hãy tìm hiểu về sóng do remote TV phát ra,mỗi hãng có những chuẩn riêng,ngày trườc mình làm với sony.Loại này có một xung start và 12bit trong đó có 5bit địa chỉ 7bit lệnh,bạn chỉ cần thu được 7bit lênh giải mã 7bit này là được,Vì các nút của remote khác nhau ở 7bit lệnh này.
|
#include <16F877A.h>
#include <def_877a.h> #FUSES NOWDT, HS, NOPUT, NOPROTECT, NODEBUG, BROWNOUT, NOLVP, NOCPD, NOWRT #use delay(clock=20000000) #use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bi ts=8) /* TIMER0 configuration */ #define TIMER1_CONFIG T1_INTERNAL | T1_DIV_BY_1 /* Interrupt rate: */ /* 4/20000000*65536*1 = 13.1 ms */ /* */ /* Start: 3.0 ms (ignored) */ /* "1": 1.8 ms (9000) */ /* "0": 1.2 ms (6000) */ #define ONE_MIN 8000 #define ONE_MAX 10000 #define ZERO_MIN 5000 #define ZERO_MAX 7000 //#include "lcd.c" /* irframes[0] (start) will be garbage, ignore it... */ int16 irframes[13]; int8 ircount = 0; int1 irdone = FALSE; #int_ext void ext_isr() {output_bit(PIN_A5, 0); if (irdone) return; irframes[ircount++] = get_timer0(); if (ircount >= 13) irdone = TRUE; set_timer0(0); enable_interrupts(INT_TIMER1); } #int_timer1 void timer_isr() { disable_interrupts(INT_TIMER1); } #separate int1 decode_ir(int8 &addr, int8 &cmd) { int8 i; int8 mask; int8 bits[13]; addr = 0; cmd = 0; for (i=1; i<=12; i++) { if ((ONE_MIN <= irframes[i]) && (irframes[i] <= ONE_MAX)) bits[i] = 0x01; else if ((ZERO_MIN <= irframes[i]) && (irframes[i] <= ZERO_MAX)) bits[i] = 0x00; else // Error return FALSE; } mask = 0x01; for (i=1; i<=7; i++) { if (bits[i]) cmd = cmd | mask; mask <<= 1; } mask = 0x01; for (i=8; i<=12; i++) { if (bits[i]) addr = addr | mask; mask <<= 1; } return TRUE; } void start_ir() { memset(irframes, 0x00, sizeof(irframes)); ircount = 0; irdone = FALSE; } void main() { int8 addr, cmd; int1 ok; delay_ms(100); setup_adc_ports(NO_ANALOGS); setup_adc(ADC_OFF); set_tris_a(0x00); set_tris_b(0b11111111); set_tris_c(0b11111011); // PIN_C2 used for the LED set_tris_d(0b00000000); // LCD set_tris_e(0b11111111); setup_spi(FALSE); output_bit(PIN_A5, 1); //lcd_init(); //output_bit(PIN_C2, 0); delay_ms(100); //lcd_putc("\fWaiting..."); setup_timer_1(TIMER1_CONFIG); setup_timer_2(T2_DISABLED, 255, 1); ext_int_edge(0, L_TO_H); enable_interrupts(INT_EXT); enable_interrupts(GLOBAL); delay_ms(100); start_ir(); while(TRUE) { if (irdone) { ok = decode_ir(addr, cmd); printf("%u", cmd); printf("%u", addr); if (!ok){ printf("1111");} else output_bit(PIN_A5, 0); delay_ms(50); output_bit(PIN_A5, 1); start_ir(); } } } cao thủ nào cho mình hỏi là code này thì port nào nhận tín hiệu vào và mình muốn xuất ra port thí phải so sánh với giá trị Mã lệnh điều khiển TV SONY Phím Mã lệnh 1 0H 2 1H 3 2H 4 3H 5 4H 6 5H 7 6H 8 7H 9 8H 10 9H và xuất ra điều khiển relay xin cảm ơn! |
Múi giờ GMT. Hiện tại là 02:26 PM. |
Tên diễn đàn: vBulletin Version 3.8.11
Được sáng lập bởi Đoàn Hiệp.
Copyright © PIC Vietnam