Jump to content

Prabhat

Members+
  • Content Count

    2
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Prabhat

  • Rank
    RC-Cam Visitor
  1. Thank you.. Now I m getting outout, the font size is bigger though for a 21" tv. I wanted to ask this. If I construct the circuit diagram part of the MAX7456 as in datasheet except taking care of /HSYNC, LOS (output) and /VSYNC, and I apply an input CVBS through a camera (which has capability of connecting to tv), will I get a background picture from camera without changing any settings of the above program?? If not, what settings should I change ?? Please assist. Thank you.
  2. Hello there.. I m trying to interface MAX7456 OSD with Atmel ATMega32. But I m not getting any characters on screen. Its coming grey (as expected) background but nothing else. I have programmed using CodeVision AVR. The code is given below. #include <mega32.h> #include <spi.h> #include <delay.h> #define SPI_CS PORTB.4 void main(void) { unsigned char ad;/*address*/ unsigned char da;/*DATA*/ unsigned char d; /*Discard echo*/ unsigned char t; /*To modify 4th bit of OSDBL*/ // Input/Output Ports initialization // Port A initialization // Func7=In Func6=In Func5=In Func4=In Func3=In Func2=In Func1=Out Func0=Out // State7=T State6=T State5=T State4=T State3=T State2=T State1=0 State0=0 PORTA=0x00; DDRA=0x03; // Port B initialization // Func7=Out Func6=In Func5=Out Func4=Out Func3=In Func2=In Func1=In Func0=In // State7=0 State6=T State5=0 State4=0 State3=T State2=T State1=T State0=T PORTB=0x00; DDRB=0xB0; // 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; // Analog Comparator initialization // Analog Comparator: Off // Analog Comparator Input Capture by Timer/Counter 1: Off ACSR=0x80; SFIOR=0x00; // SPI initialization // SPI Type: Master // SPI Clock Rate: 4000.000 kHz // SPI Clock Phase: Cycle Half // SPI Clock Polarity: Low // SPI Data Order: MSB First SPCR=0x50; SPSR=0x00; SPI_CS=1; delay_ms(100); ad=0x00; da=0x7A; //Pal and internal sync,enable display and software reset SPI_CS=0; d=spi(ad); d=spi(da); SPI_CS=1; delay_ms(100); ad=0x00; da=0x78; //Pal and internal sync and enable display SPI_CS=0; d=spi(ad); d=spi(da); SPI_CS=1; delay_ms(100); ad=0x01; //VM1 da=0xC7; SPI_CS=0; d=spi(ad); d=spi(da); SPI_CS=1; delay_ms(100); ad=0x04; //DMM da=0x20; SPI_CS=0; d=spi(ad); d=spi(da); SPI_CS=1; delay_ms(100); ad=0x05; //DMAH da=0x00; SPI_CS=0; d=spi(ad); d=spi(da); SPI_CS=1; delay_ms(100); ad=0x06; //DMAL da=0x00; SPI_CS=0; d=spi(ad); d=spi(da); SPI_CS=1; delay_ms(100); ad=0x07; //DMAL da=0x01; //To display 1 SPI_CS=0; d=spi(ad); d=spi(da); SPI_CS=1; delay_ms(100); ad=0x05; //DMAH da=0x00; SPI_CS=0; d=spi(ad); d=spi(da); SPI_CS=1; delay_ms(100); ad=0x06; //DMAL da=0x01; SPI_CS=0; d=spi(ad); d=spi(da); SPI_CS=1; delay_ms(100); ad=0x07; //DMAL da=0x02; //To display 2 SPI_CS=0; d=spi(ad); d=spi(da); SPI_CS=1; delay_ms(100); ad=0x05; //DMAH da=0x00; SPI_CS=0; d=spi(ad); d=spi(da); SPI_CS=1; delay_ms(100); ad=0x06; //DMAL da=0x02; SPI_CS=0; d=spi(ad); d=spi(da); SPI_CS=1; delay_ms(100); ad=0x07; //DMAL da=0x03; //To display 3 SPI_CS=0; d=spi(ad); d=spi(da); SPI_CS=1; delay_ms(100); ad=0xEC; //OSDBL Read da=0x00; //Garbage SPI_CS=0; d=spi(ad); d=spi(da); // now d will contain the read value SPI_CS=1; delay_ms(100); t=(unsigned int) d; t=t & 0xEF; // Modify 4th bit to 0 da=(unsigned char) t; ad=0x6C; //OSDBL Write SPI_CS=0; d=spi(ad); d=spi(da); SPI_CS=1; delay_ms(100); while(1) ; }[/codebox] As given above I m using standard function spi.h. According to codevision AVR datasheet , the spi function is unsigned char spi(unsigned char data); This function sends a byte data, simultaneously receiving a byte. Hence I m using 'd' to discard off echo I get and to read the contents of OSDBL. Why isn't characters being displayed ?? The program is supposed to display 123. Is there anything wrong with the code ?? Please assist me as soon as possible.. I have uploaded the MAX7456 part of the circuit. Thank you. Prabhat
×
×
  • Create New...