I use RS232 to connet betwen micro and CMUcam
#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?
