Em đã giải quyết được vấn đề truyền sai kí tự (mặc dù chỉ thử dc kí tự 3 và 6 là đúng hoàn toàn :d ) nhưng sao mà cứ cho hàm delay_ms(1000) vào là ko chạy đc nữa nhỉ? Ai có thể giải thích cho em lỗi ở đâu dc ko? Thank!
Thông báo
Collapse
No announcement yet.
Cần giúp đỡ về vấn đề truyền dữ liệu lến máy tính !
Collapse
X
-
Vấn đề truyền sai trong proteus là do các cổng tín hiệu trong Max232 là cổng đảo (Khác so với max232 thực tế) -> tín hiệu bị đảo -> phải thêm NOT để đảm bảo tín hiệu đúng.Attached Files----------------------
Bể học là mênh mông!
Comment
-
Ngyên nhân là gi thế bạn mình cũng đang làm về vấn đề này mình muốn chuyền con số nhận được từ cảm biến lên máy tínhNguyên văn bởi yen_trang Xem bài viếtEm đã giải quyết được vấn đề truyền sai kí tự (mặc dù chỉ thử dc kí tự 3 và 6 là đúng hoàn toàn :d ) nhưng sao mà cứ cho hàm delay_ms(1000) vào là ko chạy đc nữa nhỉ? Ai có thể giải thích cho em lỗi ở đâu dc ko? Thank!
Vấn đề của bạn có lẽ là do hàm putchar của bạn thôi bạn thư putchar('4') ;putchar('9');thử xem nhé
Comment
-
Mình đang mắc phần này, cũng không làm sao chạy được.
Đây là code của em:
/************************************************** ***
Chip type : ATmega16
Program type : Application
Clock frequency : 16.000000 MHz
Memory model : Small
External SRAM size : 0
Data Stack size : 256
************************************************** ***/
#include <mega16.h>
#include <delay.h>
// Standard Input/Output functions
#include <stdio.h>
// Alphanumeric LCD Module functions
#asm
.equ __lcd_port=0x15 ;PORTC
#endasm
#include <lcd.h>
#define RXB8 1
#define TXB8 0
#define UPE 2
#define OVR 3
#define FE 4
#define UDRE 5
#define RXC 7
#define FRAMING_ERROR (1<<FE)
#define PARITY_ERROR (1<<UPE)
#define DATA_OVERRUN (1<<OVR)
#define DATA_REGISTER_EMPTY (1<<UDRE)
#define RX_COMPLETE (1<<RXC)
// USART Receiver buffer
#define RX_BUFFER_SIZE 8
char rx_buffer[RX_BUFFER_SIZE];
#if RX_BUFFER_SIZE<256
unsigned char rx_wr_index,rx_rd_index,rx_counter;
#else
unsigned int rx_wr_index,rx_rd_index,rx_counter;
#endif
// This flag is set on USART Receiver buffer overflow
bit rx_buffer_overflow;
// USART Receiver interrupt service routine
interrupt [USART_RXC] void usart_rx_isr(void)
{
/*char status,data;
status=UCSRA;
data=UDR;
if ((status & (FRAMING_ERROR | PARITY_ERROR | DATA_OVERRUN))==0)
{
rx_buffer[rx_wr_index]=data;
if (++rx_wr_index == RX_BUFFER_SIZE) rx_wr_index=0;
if (++rx_counter == RX_BUFFER_SIZE)
{
rx_counter=0;
rx_buffer_overflow=1;
};
};
}
#ifndef _DEBUG_TERMINAL_IO_
// Get a character from the USART Receiver buffer
#define _ALTERNATE_GETCHAR_
#pragma used+
char getchar(void)
{
char data;
while (rx_counter==0);
data=rx_buffer[rx_rd_index];
if (++rx_rd_index == RX_BUFFER_SIZE) rx_rd_index=0;
#asm("cli")
--rx_counter;
#asm("sei")
return data;
}
#pragma used-
#endif
// USART Transmitter buffer
#define TX_BUFFER_SIZE 8
char tx_buffer[TX_BUFFER_SIZE];
#if TX_BUFFER_SIZE<256
unsigned char tx_wr_index,tx_rd_index,tx_counter;
#else
unsigned int tx_wr_index,tx_rd_index,tx_counter;
#endif
// USART Transmitter interrupt service routine
interrupt [USART_TXC] void usart_tx_isr(void)
{
if (tx_counter)
{
--tx_counter;
UDR=tx_buffer[tx_rd_index];
if (++tx_rd_index == TX_BUFFER_SIZE) tx_rd_index=0;
};
}
#ifndef _DEBUG_TERMINAL_IO_
// Write a character to the USART Transmitter buffer
#define _ALTERNATE_PUTCHAR_
#pragma used+
void putchar(char c)
{
while (tx_counter == TX_BUFFER_SIZE);
#asm("cli")
if (tx_counter || ((UCSRA & DATA_REGISTER_EMPTY)==0))
{
tx_buffer[tx_wr_index]=c;
if (++tx_wr_index == TX_BUFFER_SIZE) tx_wr_index=0;
++tx_counter;
}
else
UDR=c;
#asm("sei")
}
#pragma used-
#endif
// Declare your global variables here
void main(void)
{
unsigned char count;
// Input/Output Ports initialization
// Port A initialization
PORTA=0x00;
DDRA=0x00;
// Port B initialization
PORTB=0x00;
DDRB=0xB0;
// Port C initialization
PORTC=0x00;
DDRC=0xFF;
// Port D initialization
PORTD=0x00;
DDRD=0x00;
TCCR0=0x00;
TCNT0=0x00;
OCR0=0x00;
TCCR1A=0x00;
TCCR1B=0x00;
TCNT1H=0x00;
TCNT1L=0x00;
ICR1H=0x00;
ICR1L=0x00;
OCR1AH=0x00;
OCR1AL=0x00;
OCR1BH=0x00;
OCR1BL=0x00;
ASSR=0x00;
TCCR2=0x00;
TCNT2=0x00;
OCR2=0x00;
MCUCR=0x00;
MCUCSR=0x00;
// Timer(s)/Counter(s) Interrupt(s) initialization
TIMSK=0x00;
// USART initialization
// Communication Parameters: 8 Data, 1 Stop, No Parity
// USART Receiver: On
// USART Transmitter: On
// USART Mode: Asynchronous
// USART Baud rate: 9600
UCSRA=0x00;
UCSRB=0xD8;
UCSRC=0x86;
UBRRH=0x00;
UBRRL=0x67;
ACSR=0x80;
SFIOR=0x00;
// Global enable interrupts
#asm("sei")
count = 10;
while (1)
{
putchar(count);
delay_ms(100);
count++;
};
}
Comment
-
Bạn có thể dùng printf(putchar,"Hello")Nguyên văn bởi lehanhla Xem bài viếtLàm sao để gửi dc chuổi 1000.
Theo mình biết hàm putchar( ) chỉ gửi được có 1 ký tự thôi.
Mình dùng hàm puts( ) để gửi chuổi 1000.
Các bạn ai biết dùng putchar( ) để gửi số 1000 chỉ mình nhé.
Thanks các bạn.123...
Comment
-
Bạn thử thay PORTD và DDRD bằng các giá trị này thử nhé.Mình đang mắc phần này, cũng không làm sao chạy được.
Đây là code của em:
Trích:
/************************************************** ***
Chip type : ATmega16
Program type : Application
Clock frequency : 16.000000 MHz
Memory model : Small
External SRAM size : 0
Data Stack size : 256
************************************************** ***/
#include <mega16.h>
#include <delay.h>
// Standard Input/Output functions
#include <stdio.h>
// Alphanumeric LCD Module functions
#asm
.equ __lcd_port=0x15 ;PORTC
#endasm
#include <lcd.h>
#define RXB8 1
#define TXB8 0
#define UPE 2
#define OVR 3
#define FE 4
#define UDRE 5
#define RXC 7
#define FRAMING_ERROR (1<<FE)
#define PARITY_ERROR (1<<UPE)
#define DATA_OVERRUN (1<<OVR)
#define DATA_REGISTER_EMPTY (1<<UDRE)
#define RX_COMPLETE (1<<RXC)
// USART Receiver buffer
#define RX_BUFFER_SIZE 8
char rx_buffer[RX_BUFFER_SIZE];
#if RX_BUFFER_SIZE<256
unsigned char rx_wr_index,rx_rd_index,rx_counter;
#else
unsigned int rx_wr_index,rx_rd_index,rx_counter;
#endif
// This flag is set on USART Receiver buffer overflow
bit rx_buffer_overflow;
// USART Receiver interrupt service routine
interrupt [USART_RXC] void usart_rx_isr(void)
{
/*char status,data;
status=UCSRA;
data=UDR;
if ((status & (FRAMING_ERROR | PARITY_ERROR | DATA_OVERRUN))==0)
{
rx_buffer[rx_wr_index]=data;
if (++rx_wr_index == RX_BUFFER_SIZE) rx_wr_index=0;
if (++rx_counter == RX_BUFFER_SIZE)
{
rx_counter=0;
rx_buffer_overflow=1;
};
};
}
#ifndef _DEBUG_TERMINAL_IO_
// Get a character from the USART Receiver buffer
#define _ALTERNATE_GETCHAR_
#pragma used+
char getchar(void)
{
char data;
while (rx_counter==0);
data=rx_buffer[rx_rd_index];
if (++rx_rd_index == RX_BUFFER_SIZE) rx_rd_index=0;
#asm("cli")
--rx_counter;
#asm("sei")
return data;
}
#pragma used-
#endif
// USART Transmitter buffer
#define TX_BUFFER_SIZE 8
char tx_buffer[TX_BUFFER_SIZE];
#if TX_BUFFER_SIZE<256
unsigned char tx_wr_index,tx_rd_index,tx_counter;
#else
unsigned int tx_wr_index,tx_rd_index,tx_counter;
#endif
// USART Transmitter interrupt service routine
interrupt [USART_TXC] void usart_tx_isr(void)
{
if (tx_counter)
{
--tx_counter;
UDR=tx_buffer[tx_rd_index];
if (++tx_rd_index == TX_BUFFER_SIZE) tx_rd_index=0;
};
}
#ifndef _DEBUG_TERMINAL_IO_
// Write a character to the USART Transmitter buffer
#define _ALTERNATE_PUTCHAR_
#pragma used+
void putchar(char c)
{
while (tx_counter == TX_BUFFER_SIZE);
#asm("cli")
if (tx_counter || ((UCSRA & DATA_REGISTER_EMPTY)==0))
{
tx_buffer[tx_wr_index]=c;
if (++tx_wr_index == TX_BUFFER_SIZE) tx_wr_index=0;
++tx_counter;
}
else
UDR=c;
#asm("sei")
}
#pragma used-
#endif
// Declare your global variables here
void main(void)
{
unsigned char count;
// Input/Output Ports initialization
// Port A initialization
PORTA=0x00;
DDRA=0x00;
// Port B initialization
PORTB=0x00;
DDRB=0xB0;
// Port C initialization
PORTC=0x00;
DDRC=0xFF;
// Port D initialization
PORTD=0x01;
DDRD=0x02;
TCCR0=0x00;
TCNT0=0x00;
OCR0=0x00;
TCCR1A=0x00;
TCCR1B=0x00;
TCNT1H=0x00;
TCNT1L=0x00;
ICR1H=0x00;
ICR1L=0x00;
OCR1AH=0x00;
OCR1AL=0x00;
OCR1BH=0x00;
OCR1BL=0x00;
ASSR=0x00;
TCCR2=0x00;
TCNT2=0x00;
OCR2=0x00;
MCUCR=0x00;
MCUCSR=0x00;
// Timer(s)/Counter(s) Interrupt(s) initialization
TIMSK=0x00;
// USART initialization
// Communication Parameters: 8 Data, 1 Stop, No Parity
// USART Receiver: On
// USART Transmitter: On
// USART Mode: Asynchronous
// USART Baud rate: 9600
UCSRA=0x00;
UCSRB=0xD8;
UCSRC=0x86;
UBRRH=0x00;
UBRRL=0x67;
ACSR=0x80;
SFIOR=0x00;
// Global enable interrupts
#asm("sei")
count = 10;
while (1)
{
putchar(count);
delay_ms(100);
count++;
};
}
PORTD=0x01;
DDRD=0x02;
Chú ý: PORTD.0 là chân nhận dữ liệu nên phải khai báo là input.
PORTD.1 là chân truyền dữ liệu nên phải khai báo là output.Phone: 0909319477
Email:
Comment
-
Theo mình, bạn nên kiểm tra lại phần cứng, lưu ý kết nối Rx ben phia mạch kết nối với Tx bên PC va ngược lại. Code ko có vấn đề gìNguyên văn bởi thanhtuandkh Xem bài viếtMình đang mắc phần này, cũng không làm sao chạy được.
Đây là code của em:
Comment
-
Cảm ơn bác đã hướng dẫn nhưng em thấy khi định cấu hình sử dụng UART thì việc khai báo DDR của pin TX và RX là không cần thiết.Nguyên văn bởi lehanhla Xem bài viếtBạn thử thay PORTD và DDRD bằng các giá trị này thử nhé.
PORTD=0x01;
DDRD=0x02;
Chú ý: PORTD.0 là chân nhận dữ liệu nên phải khai báo là input.
PORTD.1 là chân truyền dữ liệu nên phải khai báo là output.
Mặt khác em cũng đã thử nhưng ...kết quả vẫn im re. KHông thể bắn được lên máy tính.
Bác nào đã từng làm món này giúp em với .....
Comment
-
Đoạn code này mình viết cho con Atmega32, mình test okie rồi.
Mình cũng thử truyền bằng giao diện, thấy cũng Okie
Last edited by lehanhla; 24-04-2009, 16:56.Phone: 0909319477
Email:
Comment
-
Các bác xem giúp em đoạn cốt này với em muốn truyền con số thu được từ cảm biến qua adc lên vi điều khiển nhưng mà em mô phỏng bằng proteus thử thì không được nó hiện kí tự lung tung quá không ra những con số mà cảm biến thu được
Em khởi tạo tần số dao động của atmega16 là 8 mhz với sai số của khung truyền là 0.2% liệu đây có phải là nguyên nhân truyền sai không nhỉ các bác ?
Em thử mô phỏng khởi tạo bằng codevision C với tần số chuẩn như 11.0592 để sai số khung truyền 0.0% thì truyền lên đúng những kí tự mà mình đã truyền nhưng với lỗi 0.2% thi lại không được các bác giải thích giúp em với !
Mong các bác giúp đỡ
#include <mega16.h>
#include<delay.h>
// Alphanumeric LCD Module functions
#asm
.equ __lcd_port=0x18 ;PORTB
#endasm
#include <lcd.h>
#define RXB8 1
#define TXB8 0
#define UPE 2
#define OVR 3
#define FE 4
#define UDRE 5
#define RXC 7
#define FRAMING_ERROR (1<<FE)
#define PARITY_ERROR (1<<UPE)
#define DATA_OVERRUN (1<<OVR)
#define DATA_REGISTER_EMPTY (1<<UDRE)
#define RX_COMPLETE (1<<RXC)
// USART Receiver buffer
#define RX_BUFFER_SIZE 8
char rx_buffer[RX_BUFFER_SIZE];
#if RX_BUFFER_SIZE<256
unsigned char rx_wr_index,rx_rd_index,rx_counter;
#else
unsigned int rx_wr_index,rx_rd_index,rx_counter;
#endif
// This flag is set on USART Receiver buffer overflow
bit rx_buffer_overflow;
// USART Receiver interrupt service routine
interrupt [USART_RXC] void usart_rx_isr(void)
{
char status,data;
status=UCSRA;
data=UDR;
if ((status & (FRAMING_ERROR | PARITY_ERROR | DATA_OVERRUN))==0)
{
rx_buffer[rx_wr_index]=data;
if (++rx_wr_index == RX_BUFFER_SIZE) rx_wr_index=0;
if (++rx_counter == RX_BUFFER_SIZE)
{
rx_counter=0;
rx_buffer_overflow=1;
};
};
}
#ifndef _DEBUG_TERMINAL_IO_
// Get a character from the USART Receiver buffer
#define _ALTERNATE_GETCHAR_
#pragma used+
char getchar(void)
{
char data;
while (rx_counter==0);
data=rx_buffer[rx_rd_index];
if (++rx_rd_index == RX_BUFFER_SIZE) rx_rd_index=0;
#asm("cli")
--rx_counter;
#asm("sei")
return data;
}
#pragma used-
#endif
// USART Transmitter buffer
#define TX_BUFFER_SIZE 8
char tx_buffer[TX_BUFFER_SIZE];
#if TX_BUFFER_SIZE<256
unsigned char tx_wr_index,tx_rd_index,tx_counter;
#else
unsigned int tx_wr_index,tx_rd_index,tx_counter;
#endif
// USART Transmitter interrupt service routine
interrupt [USART_TXC] void usart_tx_isr(void)
{
if (tx_counter)
{
--tx_counter;
UDR=tx_buffer[tx_rd_index];
if (++tx_rd_index == TX_BUFFER_SIZE) tx_rd_index=0;
};
}
#ifndef _DEBUG_TERMINAL_IO_
// Write a character to the USART Transmitter buffer
#define _ALTERNATE_PUTCHAR_
#pragma used+
void putchar(char c)
{
while (tx_counter == TX_BUFFER_SIZE);
#asm("cli")
if (tx_counter || ((UCSRA & DATA_REGISTER_EMPTY)==0))
{
tx_buffer[tx_wr_index]=c;
if (++tx_wr_index == TX_BUFFER_SIZE) tx_wr_index=0;
++tx_counter;
}
else
UDR=c;
#asm("sei")
}
#pragma used-
#endif
// Standard Input/Output functions
#include <stdio.h>
#define FIRST_ADC_INPUT 0
#define LAST_ADC_INPUT 1
unsigned char adc_data[LAST_ADC_INPUT-FIRST_ADC_INPUT+1];
#define ADC_VREF_TYPE 0x20
// ADC interrupt service routine
// with auto input scanning
interrupt [ADC_INT] void adc_isr(void)
{
register static unsigned char input_index=0;
// Read the 8 most significant bits
// of the AD conversion result
adc_data[input_index]=ADCH;
// Select next ADC input
if (++input_index > (LAST_ADC_INPUT-FIRST_ADC_INPUT))
input_index=0;
ADMUX=(FIRST_ADC_INPUT|ADC_VREF_TYPE)+input_index;
// Start the AD conversion
ADCSRA|=0x40;
}
// Declare your global variables here
void lcd_putnum(unsigned char so,unsigned char x,unsigned char y)
{
unsigned char a,b,c;
a=so/100;
b=(so-100*a)/10
c=(so-100*a-10*b);
lcd_gotoxy(x,y);
lcd_putchar(a+48);
lcd_putchar(b+48);
lcd_putchar(c+48);
}
void chuyendoi(unsigned char so)
{
unsigned char a,b,c;
a=so/100;
b=(so-100*a)/10;
c=(so-100*a-10*b);
putchar('a');
delay_ms(300);
putchar('b');
delay_ms(300);
putchar('c');
delay_ms(300);
}
void main(void)
{
// Declare your local variables here
// Input/Output Ports initialization
// Port A initialization
// Func7=In Func6=In Func5=In Func4=In Func3=In Func2=In Func1=In Func0=In
// State7=T State6=T State5=T State4=T State3=T State2=T State1=T State0=T
PORTA=0x00;
DDRA=0x00;
// Port B initialization
// Func7=In Func6=In Func5=In Func4=In Func3=In Func2=In Func1=In Func0=In
// State7=T State6=T State5=T State4=T State3=T State2=T State1=T State0=T
PORTB=0x00;
DDRB=0x00;
// Port C initialization
// Func7=In Func6=In Func5=In Func4=In Func3=In Func2=In Func1=In Func0=In
// State7=T State6=T State5=T State4=T State3=T State2=T State1=T State0=T
PORTC=0x00;
DDRC=0x00;
// Port D initialization
// Func7=In Func6=In Func5=In Func4=In Func3=In Func2=In Func1=In Func0=In
// State7=T State6=T State5=T State4=T State3=T State2=T State1=T State0=T
PORTD=0x00;
DDRD=0x00;
// Timer/Counter 0 initialization
// Clock source: System Clock
// Clock value: Timer 0 Stopped
// Mode: Normal top=FFh
// OC0 output: Disconnected
TCCR0=0x00;
TCNT0=0x00;
OCR0=0x00;
// Timer/Counter 1 initialization
// Clock source: System Clock
// Clock value: Timer 1 Stopped
// Mode: Normal top=FFFFh
// OC1A output: Discon.
// OC1B output: Discon.
// Noise Canceler: Off
// Input Capture on Falling Edge
// Timer 1 Overflow Interrupt: Off
// Input Capture Interrupt: Off
// Compare A Match Interrupt: Off
// Compare B Match Interrupt: Off
TCCR1A=0x00;
TCCR1B=0x00;
TCNT1H=0x00;
TCNT1L=0x00;
ICR1H=0x00;
ICR1L=0x00;
OCR1AH=0x00;
OCR1AL=0x00;
OCR1BH=0x00;
OCR1BL=0x00;
// Timer/Counter 2 initialization
// Clock source: System Clock
// Clock value: Timer 2 Stopped
// Mode: Normal top=FFh
// OC2 output: Disconnected
ASSR=0x00;
TCCR2=0x00;
TCNT2=0x00;
OCR2=0x00;
// External Interrupt(s) initialization
// INT0: Off
// INT1: Off
// INT2: Off
MCUCR=0x00;
MCUCSR=0x00;
// Timer(s)/Counter(s) Interrupt(s) initialization
TIMSK=0x00;
// USART initialization
// Communication Parameters: 8 Data, 1 Stop, No Parity
// USART Receiver: On
// USART Transmitter: On
// USART Mode: Asynchronous
// USART Baud rate: 9600
UCSRA=0x00;
UCSRB=0xD8;
UCSRC=0x86;
UBRRH=0x00;
UBRRL=0x33;
// Analog Comparator initialization
// Analog Comparator: Off
// Analog Comparator Input Capture by Timer/Counter 1: Off
ACSR=0x80;
SFIOR=0x00;
// ADC initialization
// ADC Clock frequency: 125.000 kHz
// ADC Voltage Reference: AREF pin
// ADC Auto Trigger Source: None
// Only the 8 most significant bits of
// the AD conversion result are used
ADMUX=FIRST_ADC_INPUT|ADC_VREF_TYPE;
ADCSRA=0xCE;
// LCD module initialization
lcd_init(16);
// Global enable interrupts
#asm("sei")
while (1)
{
unsigned char x;
// Place your code here
lcd_putnum(2*adc_data[1],0,0);
// lcd_putnum(adc_data[0],0,1);
x=2*adc_data[1] ;
chuyendoi(x);
};
}Last edited by huetkiem; 24-04-2009, 23:06.
Comment
-
Giúp mình về chuong trình nhận dư liệu bằng cổng com viết bằng c#
Chương trình nhận dữ liệu qua cổng com của mình nhận dữ liệu qua Com, ở tốc độ 9600 thì rất ngon, nhưng mà lên tốc độ 115200 thì dữ liệu tải lên toàn bị lỗi font và không đủ. Các bác giải thích giúp tớ được không?
: dữ liệu đẩy lên cứ 2 giây 1 lần có dạng:
lat:abc,long:abc,accuracy:72.4237,view:10;
code của tớ đây
delegate void SetTextCallback(string text); // Khai bao delegate SetTextCallBack voi tham so string
private void DataReceive(object obj, SerialDataReceivedEventArgs e)
{
try {
System.Threading.Thread.Sleep(3000);
InputData = P.ReadExisting();
}
catch { InputData = "Lỗi nhận từ COM."; }
string a = InputData;
if (a != String.Empty)
{
//txtkq.Text = InputData; // Ko dùng đc như thế này vì khác threads .
SetText(a); // Chính vì vậy phải sử dụng ủy quyền tại đây. Gọi delegate đã khai báo trước đó.
}
}
// Hàm của em nó là ở đây. Đừng hỏi vì sao lại thế.
private void SetText(string text)
{
string strText = DateTime.Now.ToString() + ": \n" + text + "\n";
if (this.txtkq.InvokeRequired)
{
SetTextCallback d = new SetTextCallback(SetText); // khởi tạo 1 delegate mới gọi đến SetText
this.Invoke(d, new object[] { strText });
}
else this.txtkq.Text = strText;
SaveGPSToDB(InputData);
}
Comment
Bài viết mới nhất
Collapse
-
Trả lời cho Yêu thơ mê nhạc, mời các bác vào đây!bởi dinhthuong92Bài hát mới, nhạc Phật: Về Giữa Chiêm Bao, sáng tác: Hoàng Đình Thường.
[Verse 1] Nhân gian bao thay đổi
ĐỜI là giấc CHIÊM BAO
Người mê lầm tranh đấu
KHỔ ĐAU mãi LUÂN HỒI.
VÔ THƯỜNG nào ai thấu
...-
Channel: Tâm tình dân kỹ thuật
Hôm qua, 19:01 -
-
Trả lời cho Giúp mình vẽ sơ đồ và phân tích nguyên lý làm việc của khảo sát các mạch nguồn ổn áp vớibởi davidcopyBạn muốn hỏi nguyên lý làm việc của mạch nào...
-
Channel: Hỗ trợ học tập
24-03-2026, 22:50 -
-
Trả lời cho Giúp mình vẽ sơ đồ và phân tích nguyên lý làm việc của khảo sát các mạch nguồn ổn áp vớibởi N_Tu_Hoc_HoiBạn cần sơ đồ mạch ổn áp bao nhiêu Volt, Nếu giống anh bạn guiwr có khả năng ổn áp dùng iC họ 78XX, 79XX. Những mạch này bạn tim kiếm trên google sẽ thấy!!
-
Channel: Hỗ trợ học tập
23-03-2026, 02:32 -
-
bởi chinhnguyen9
Điến âp vào 24V;Điên áp ra 30V;Dòng điện ra 10A
Trên nền tảng mạch Boost thay đổi như sau: cự âm tụ lọc C không nối mas mà nối vào Vc +24V
Mach phản hồi tao điê áp trên tụ lọc này ổn đinh ở 6V
Kết quả:
· Điện áp ra =24V+ 6V=30V
· Công...-
Channel: Hướng dẫn sử dụng diễn đàn
21-03-2026, 19:33 -
-
bởi chinhnguyen92. Các yếu tố để dòng điện đầu ra không bị "thiếu"
Dòng điện đầu ra bị "thiếu" có thể hiểu là không đủ 10A theo yêu cầu hoặc bị sụt áp khi tải thay đổi. Để đảm bảo điều này, bạn cần xem xét các yếu tố sau:
a. Khả năng chịu dòng của cuộn cảm- Dòng bão hòa (I_sat): Như
-
Channel: Hướng dẫn sử dụng diễn đàn
21-03-2026, 19:06 -
bởi chinhnguyen9
1. Tính toán cuộn cảm (Inductor)
Để tính giá trị cuộn cảm, chúng ta cần thực hiện các bước sau:
a. Xác định chu kỳ nhiệm vụ (Duty Cycle - D)
Với mạch tăng áp lý tưởng, chu kỳ nhiệm vụ được tính theo công thức :
D=1-VinVout=1-24V30V=0.2
Vậy D = 0.2 (20%)
b....-
Channel: Hướng dẫn sử dụng diễn đàn
21-03-2026, 19:03 -
-
bởi chinhnguyen9Công thức
Gain (dB) = 20 × log₁₀(A)
Thí dụ 1; 60dB
log₁₀(A)=60/20=3
⇒ A=V_out / V_in = 10³ = 1.000
Thí dụ 2; 100dB
log₁₀(A)=100/20=5
⇒ A=V_out / V_in = 105 = 100.000
Tí dụ 3; LM 358
Large Signal Open Loop Voltage Gain AVOL V/mV RL = 2.0...-
Channel: Hướng dẫn sử dụng diễn đàn
19-03-2026, 08:44 -
-
Trả lời cho Mạch 3s bị giảm điện áp đầu rabởi minhtri0405chả biết bạn xử lý được chưa , kích sạc hoặc điện áp > điện áp khối pin vào 2 chân P - P+ , nhiều mạch phải yêu cầu có kích lần đầu sau đó mới chạy...
-
Channel: Điện tử dành cho người mới bắt đầu
18-03-2026, 10:01 -
-
bởi minhtri0405đây có phải là 1 cách để test mosfet xịn hay dỏm khi mua đồ tàu không nhỉ , vì ko thể đập ra để coi lõi rồi trả hàng được....
-
Channel: Tâm tình dân kỹ thuật
18-03-2026, 09:57 -
Đúng là cái bọn chợ Trời toàn bán đồ lởm ^_^

Comment