Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 22nd April 2004, 12:57 AM   (permalink)
Default ccd scanner

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 http://www.allelectronics.com/spec/BCS-84.pdf

and the chip's datasheet is at http://www.atmel.com/dyn/resources/p...ts/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.
__________________
i\'m actually a novice in the robotics field and would love to get help to lunch my projects..
hani_a is offline  
Old 22nd April 2004, 02:47 PM   (permalink)
Default

Have made sure that you are transmitting at the same baudrate and with the same "protocol" as chosen in your DIP switch in the scanner.?

I guess that putchar() is a serial output command. But where are you defining the way it should transmit. You are going to need 1 start bit, 8 bit data no parity, and 1 stop bit. (aka 8N1)

Also you do realize that it buzzes and lights only for 150msec. So you at least have to do this command 5-6 times for you to see it.

Hope it helps,

Ivan
ivancho is offline  
Old 22nd April 2004, 06:56 PM   (permalink)
Default ccd scanner

Hello,

first of all, thanks so much for your response. second of all, i'm pretty sure that i've sent 8n1 data packets. i've actually checked the output signal via the oscilloscope. now my questions are:
1) you say that i need to send the packet 5 or 6 times to be able to see it, i put it in the while loop, so i expect it to keep buzzing forever. am i correct?
2) since it would buz for 150ms, i should hear a fast buzz, correct?

thanks a million for the help!
__________________
i\'m actually a novice in the robotics field and would love to get help to lunch my projects..
hani_a is offline  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 05:25 AM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker