LMPForum  # transfomer

Full Member

6

## transfomer's Achievements

1. if anyone know it ,please tell me,thanks i use at24c02 EEPROM in my circuit, just use one ,according to some data online, if you use 1 EEPROM ,then A0,A1,A2 can hang in the air,and i do it, but the circuit doesnt work,will it must connect to the ground?or a pull up resistance will success?
2. The high current regulator uses an additional winding or a separate transformer to supply power for the LM317 regulator so that the pass transistors can operate closer to saturation and improve efficiency. For good efficiency the voltage at the collectors of the two parallel 2N3055 pass transistors should be close to the output voltage. The LM317 requires a couple extra volts on the input side, plus the emitter/base drop of the 3055s, plus whatever is lost across the (0.1 ohm) equalizing resistors (1volt at 10 amps), so a separate transformer and rectifier/filter circuit is used that is a few volts higher than the output voltage. The LM317 will provide over 1 amp of current to drive the bases of the pass transistors and assumming a gain of 10 the combination should deliver 15 amps or more. The LM317 always operates with a voltage difference of 1.2 between the output terminal and adjustment terminal and requires a minimum load of 10mA, so a 75 ohm resistor was chosen which will draw (1.2/75 = 16mA). This same current flows through the emitter resistor of the 2N3904 which produces about a 1 volt drop across the 62 ohm resistor and 1.7 volts at the base. The output voltage is set with the voltage divider (1K/560) so that 1.7 volts is applied to the 3904 base when the output is 5 volts. For 13 volt operation, the 1K resistor could be adjusted to around 3.6K. The regulator has no output short circuit protection so the output probably should be fused. contact with me if you need the schametic
3. http://www.dzsc.com/data/uploadfile/2008425105430490.jpg i found this circuit in a site ,just carrying out it ,i use RS232 before ,will rs485 the same to it ,is there a differ in program TL750L05,SN75LBC184
4. /************************************************************ MCU:ATega16L 8MHz ************************************************************/ #include <mega16.h> //#include <delay.h> //#include <stdio.h> #include "hzk.h" /*LCD引脚定义 PB0-7对应LCD DB0-DB7*/ #define CS1 PORTA.6 #define CS2 PORTA.5 #define RS PORTA.2 #define RW PORTA.3 #define E PORTA.4 #define RST PORTA.7 #define SPEAK PORTA.0 #define LCDEL PORTA.1 #define MOTO1A PORTD.6 #define MOTO1B PORTD.7 #define MOTO2A PORTC.0 #define MOTO2B PORTC.1 #define HD7279CS 0 #define HD7279CLK 1 #define HD7279DATA 4 #define HD7279KEY 5 #define PD2 2 #define PD3 3 #define URSEL 7 //#define UMSEL 6 //#define UPM1 5 //#define UPM0 4 //#define USBS 3 #define UCSZ1 2 #define UCSZ0 1 //#define UCPOL 0 #define RXCIE 7 #define TXCIE 6 #define UDRIE 5 #define RXEN 4 #define TXEN 3 #define UCSZ2 2 #define RXB8 1 #define TXB8 0 #define RXC 7 #define TXC 6 #define UDRE 5 #define FE 4 #define DOR 3 #define OVR 3 /*This definition differs from the databook*/ #define PE 2 #define U2X 1 #define MPCM 0 typedef const struct { unsigned char X; unsigned char Y; }LCDPos; LCDPos const LCDInfo[]={{0x28,0x00},{0x30,0x00},{0x38,0x00},{0x40,0x00},{0x48,0x00}, {0x50,0x00},{0x58,0x00}, {0x30,0x02},{0x38,0x02},{0x40,0x02}, {0x48,0x02},{0x50,0x02}, {0x30,0x04},{0x40,0x04}, {0x30,0x06},{0x40,0x06},{0x48,0x06}}; unsigned char LCDInfoBuf; int Count = 1234; void delay_us(int time) { do { time--; } while (time>1); } void Delay(int x) { int i,j; for(j=0;j<x;j++) { for(i=0;i<250;i++); } } unsigned char receive_byte(void) { unsigned char i,temp=0; DDRD &= ~(1<<HD7279DATA); delay_us(90); for(i=0;i<8;i++) { temp=temp<<1; PORTD |= (1<<HD7279CLK); delay_us(10); if((PIND & (1<<HD7279DATA))!=0) temp|=0x01; PORTD &= ~(1<<HD7279CLK); delay_us(10); } DDRD |= (1<<HD7279DATA); return temp; } void send_byte(unsigned char para) { unsigned char i; PORTD &= ~(1<<HD7279CS); delay_us(90); for(i=0;i<8;i++) { if((para&0x80)==0x80) PORTD |= (1<<HD7279DATA); else PORTD &= ~(1<<HD7279DATA); PORTD |= (1<<HD7279CLK); delay_us(10); PORTD &= ~(1<<HD7279CLK); delay_us(10); para=para<<1; } } void write7279(unsigned char cmd1, unsigned char cmd2) { send_byte (cmd1); send_byte (cmd2); PORTD |= (1<<HD7279CS); } void Rst7279(void) { send_byte(0xa4); PORTD |= (1<<HD7279CS); } unsigned char Read7279(void) { unsigned char keyval; if((PIND & (1<<HD7279KEY))==0) { send_byte(0x15); keyval=receive_byte(); PORTD |= (1<<HD7279CS); return keyval; } return 0xff; } void LCD_NOP(void) { unsigned char i; for(i=0;i<50;i++); // #asm("NOP"); } void LCD_Write_ComL(unsigned char x) { CS1=0; CS2=1; LCD_NOP(); RS=0; E=1; LCD_NOP(); RW=0; PORTB=x; E=1; E=0; CS1=1; CS2=1; } void LCD_Write_DatL(unsigned char x) { CS1=0; CS2=1; LCD_NOP(); RS=0; E=1; LCD_NOP(); RS=1; RW=0; PORTB=x; E=1; E=0; CS1=1; CS2=1; } void LCD_Write_ComR(unsigned char x) { CS1=1; CS2=0; LCD_NOP(); RS=0; E=1; LCD_NOP(); RW=0; PORTB=x; E=1; E=0; CS1=1; CS2=1; } void LCD_Write_DatR(unsigned char x) { CS1=1; CS2=0; LCD_NOP(); RS=0; E=1; LCD_NOP(); RS=1; RW=0; PORTB=x; E=1; E=0; CS1=1; CS2=1; } void LCD_Init(void) { RST = 1; RST = 0; Delay(200); RST = 1; LCD_Write_ComL(0x3e); LCD_Write_ComR(0x3e); LCD_Write_ComL(0x3f); LCD_Write_ComR(0x3f); LCD_Write_ComL(0xc0); LCD_Write_ComR(0xc0); } void LCD_Clr(void) { unsigned char i,j; for(j=0;j<8;j++) { LCD_Write_ComL(0xb8|j); LCD_Write_ComL(0x40); LCD_Write_ComR(0xb8|j); LCD_Write_ComR(0x40); for(i=0;i<64;i++) { LCD_Write_DatL(0x00); LCD_Write_DatR(0x00); } } } void CCW_PR(unsigned int neima,unsigned char X,unsigned char Y,unsigned char fan) { unsigned char k,com,dat1,hz; unsigned int i; Y=Y|0xb8; LCD_Write_ComL(Y); LCD_Write_ComR(Y); if(neima<CB1B1) hz=8; else hz=0; if(X<0x40) { com=X+0x40; LCD_Write_ComL(com); k='L'; } else { com=X; LCD_Write_ComR(X); //Com=X-0x40+0x40 } com=com&0x3f; for(i=neima;i<(16+neima-hz);i++) { dat1=hzdot; if(fan) dat1=~dat1; if(k=='L') { LCD_Write_DatL(dat1); } else { LCD_Write_DatR(dat1); } com++; if(com==0x40) { LCD_Write_ComR(com); k='R'; } } Y++; LCD_Write_ComL(Y); LCD_Write_ComR(Y); if(X<0x40) { com=X|0x40; LCD_Write_ComL(com); k='L'; } else { com=X; LCD_Write_ComR(X); //Com=X-0x40+0x40 } com=com&0x3f; for(i=(16+neima-hz);i<(32+neima-hz-hz);i++) { dat1=hzdot; if(fan) dat1=~dat1; if(k=='L') { LCD_Write_DatL(dat1); } else { LCD_Write_DatR(dat1); } com++; if(com==0x40) { LCD_Write_ComR(com); k='R'; } } } void logo(void) { CCW_PR(CB5E7,0x4-2,0x06,0); CCW_PR(CBBB0,0x14-2,0x06,0); CCW_PR(CHAR_30,0x28-2,0x06,0); CCW_PR(CHAR_31,0x30-2,0x06,0); CCW_PR(CHAR_32,0x38-2,0x06,0); CCW_PR(CHAR_33,0x40-2,0x06,0); CCW_PR(CHAR_34,0x48-2,0x06,0); CCW_PR(CHAR_35,0x50-2,0x06,0); CCW_PR(CHAR_36,0x58-2,0x06,0); CCW_PR(CHAR_37,0x60-2,0x06,0); CCW_PR(CHAR_38,0x68-2,0x06,0); CCW_PR(CHAR_39,0x70-2,0x06,0); // CCW_PR(ASC0,0x78-2,0x06,0); } // External Interrupt 0 service routine interrupt [EXT_INT0] void ext_int0_isr(void) { // Place your code here if(PIND & (1<<PD3)) Count++; else Count--; } //主程序 void main(void) { unsigned int i; unsigned char Key; DDRB=0xff; PORTB=0x00; DDRA=0xff; DDRC = 0xff; PORTC = 0x00; // Port D initialization // Func7=Out Func6=Out Func5=In Func4=Out Func3=In Func2=In Func1=Out Func0=Out // State7=0 State6=0 State5=P State4=0 State3=P State2=P State1=0 State0=0 PORTD=0x2C; DDRD=0xD3; // External Interrupt(s) initialization // INT0: On // INT0 Mode: Rising Edge // INT1: Off // INT2: Off GICR|=0x40; MCUCR=0x03; MCUCSR=0x00; GIFR=0x40; Rst7279(); #asm("wdr"); #asm("SEI"); //开总中断 LCD_Init(); //LCD初始化 LCD_Clr(); //LCD清屏 MOTO1A = 0; MOTO1B = 1; MOTO2A = 0; MOTO2B = 1; SPEAK = 1; LCDEL = 1; logo(); Delay(200); Delay(200); while(1) { Key = Read7279(); if(Key != 0xff) Count = Key; LCDInfoBuf=(Count/10000)%10; LCDInfoBuf=(Count/1000)%10; LCDInfoBuf=(Count/100)%10; LCDInfoBuf=(Count/10)%10; LCDInfoBuf=(Count)%10; for (i=0;i<7;i++) { CCW_PR(LCDInfoBuf*16,LCDInfo.X,LCDInfo.Y,0); } } }