Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

ccd scanner programming

Status
Not open for further replies.

hani_a

New Member
Hello people,

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**

and the chip's datasheet is at http://www.atmel.com/dyn/resources/prod_documents/doc2466.pdf

would anyone please have a look at the datasheets and tell me what it is i might be doing wrong...

I really appreciate the help!

Hani A.
 
Not enough information!

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?
 
ccd scanner

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!

thanks for the reply
 
Re: ccd scanner

hani_a said:
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!

thanks for the reply

When debugging this type of HW, I find a terminal program to be an invaluable aid. Here is one good one: https://bray.velenje.cx/avr/terminal.

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.

Jem
 
good idea, but!

hi jem, i really appreciate the help... but the site you showed doesn't work, do u know of another one??

thanks again!
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top