Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
11 years, 6 months ago.
Cannot shake hands LPC1768 and C1098-SS
I am using LPC1768 and C1098-SS(http://silentsystem.jp/c1098.htm,http://www.silentsystem.jp/download/C1098UM.pdf). Now the mbed send initialization signal and try to shake hands the mbed and the camera. But shake hands command is not unsuccessful. Mbed often catch a signal from C1098 or not. And the signal doesn't have no meaning. Why? I didn't understand...
<main.h>
#include "mbed.h"
#include "CameraC1098.h"
- CameraC1098 camera(p9, p10);
- int main()
- {
- printf("\r\n");
- printf("==========\r\n");
- printf("CameraC1098\r\n");
- printf("==========\r\n");
- CameraC1098::ErrorNumber err = CameraC1098::NoError;
- err = camera.init(CameraC1098::Baud14400, CameraC1098::JpegResolution320x240); 460800 change 14400
- if (CameraC1098::NoError == err)
- {printf("[ OK ] : CameraC1098::init\r\n");}
- else
- {printf("[FAIL] : CameraC1098::init (Error=%02X)\r\n", (int)err);}
- return 0;
- }
<cameraC1098.h> http://mbed.org/users/sunifu/code/CameraC1098/file/5a6468b4164d/CameraC1098.h
<cameraC1098.cpp> http://mbed.org/users/sunifu/code/CameraC1098/file/5a6468b4164d/CameraC1098.cpp
And add the code for check what Mbed is working. |
413Line printf("RECVFUNC(recv, sizeof(recv)):%02x\r\n",RECVFUNC(recv, sizeof(recv)));return 00,Mbed cannot receive signals from camera, return 01, Mbed catch it. |
471Line printf("i:%d buf[i]:%02x\r\n",i,buf[i]); buf[i] is the data from C1098 |
1 Answer
10 years, 9 months ago.
Hi Lab1 MIYAZAKI san. I am Sorry. I did not notice a question. It is a cause that designation of the transmission baudrate of mbed is not considered to be. Please test it with this program.
Sample
#include "mbed.h" #include "CameraC1098.h" CameraC1098 camera(p9, p10); int main() { printf("\r\n"); printf("==========\r\n"); printf("CameraC1098\r\n"); printf("==========\r\n"); camera.setmbedBaud(CameraC1098::Baud14400); // <= this! CameraC1098::ErrorNumber err = CameraC1098::NoError; err = camera.init(CameraC1098::Baud14400, CameraC1098::JpegResolution320x240); if (CameraC1098::NoError == err) { printf("[ OK ] : CameraC1098::init\r\n"); } else { printf("[FAIL] : CameraC1098::init (Error=%02X)\r\n", (int)err); } return 0; }