I'm programming a ccd scanner via ATMega16. I'm using the following code to transmit the signal from the chip to the scanner but i'm getting absolutely no response:
while (1){
putchar(0x1b);
putchar(0x54);
putchar(0x0d);
// this code should buzz the scanner but it's not buzzing
}
the scanner's datasheet is at **broken link removed**
Did you properly initialize the USART of the Mega8? (Baud rate, data length, parity, number of stop bits). Does it match the selected scanner's settings? Is the USART even enabled?
yes, everything you mentioned is checked. i use an oscilloscope to check the signal entering the input of the scanner and it's exactly what it requires. that's why i'm clueless!
yes, everything you mentioned is checked. i use an oscilloscope to check the signal entering the input of the scanner and it's exactly what it requires. that's why i'm clueless!
You will need to use an RS232 interface chip (Maxim, or LT or a lot of others) to convert the PC's RS232 level to TTL level as required by the scanner. If you plan only to transmit from the PC to the scanner, you can get away with a simple NPN level shifter/inverter. That way you can definitely determine where the problem lies.