Author Topic: CMUcam can't Connect to Atmega16  (Read 1253 times)

0 Members and 1 Guest are viewing this topic.

Offline kupterTopic starter

  • Jr. Member
  • **
  • Posts: 18
  • Helpful? 0
CMUcam can't Connect to Atmega16
« on: December 16, 2010, 11:52:30 PM »
I use RS232 to connet betwen micro and CMUcam   
Code: [Select]
#include <avr/io.h>
#include <util/delay.h>
#include <avr/interrupt.h>
#include <stdio.h>
#include <rprintf.h>
#include <buffer.h>
#include <global.h>
#include <uart.h>

void CMUcam_Initialize(void)
    {

    rprintfInit(uartSendByte);//change UART to CMUcam
    rprintf("RS");  // Reset CMUcam
    //_delay_ms(500);  // wait 500 milliseconds
    rprintf("cr 18 44"); // Set CMUcam to AutoExposure
    //_delay_ms(500);  // wait 500 milliseconds
    rprintf("RM 1");  // Set CMUcam to Raw Serial Mode
    //_delay_ms(500);   // wait 500 milliseconds
    }
void delay_ms(int ms)
{
for (int i=0;i<ms;i++){_delay_ms(1);}}

int main(void)
{
uartInit();
uartSetBaudRate(9600);
//CMUcam_Initialize();

while(1)
{
rprintfInit(uartSendByte);
rprintf("SV 0 200");
delay_ms(1000);
rprintfInit(uartSendByte);
rprintf("SV 0 50");
delay_ms(1000);
}
}
this programe use to control servo that I put on port Servo 0 ,,,  i but when I run this programe cmucam doesn't work.
I already check Tx and Rx from RS232.. there is signal from from microcontroller... but cmucam still doesn't work...

I hope somebody can give me advice how this err happpen.... there something  mistake  make?


Offline kupterTopic starter

  • Jr. Member
  • **
  • Posts: 18
  • Helpful? 0
Re: CMUcam can't Connect to Atmega16
« Reply #1 on: August 10, 2011, 02:38:14 AM »
I only can say thank you very much for people who give advice about my project cmucam, now my robot already done and i already finish my final project

 


Get Your Ad Here

data_list