CFA-635 USB LCD and Wavecom microcontroller

Dimdom

New member
Hi,

I'm trying to connect and send data to a CFA-635 through a Wavecom Q2686 microcontroller. Do you have any experience in controlling data flow? I'm a bit confused on how to send data to the LCD.

Please help me.
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.
 

CF Support2

Administrator
Communication with the CFA635 series requires that you send the module structured data packets that include a CRC. The module will also send the host a similar packet as well when reporting key press / release, temperature (DOW) data, as well as fan informtion. Host communications information starts on page 18 of the data sheet, and calculating the CRC can be found in Appendix C starting on page 50:

http://www.crystalfontz.com/products/635/datasheets/1026/CFA635TMFKU_v1.4c.pdf

As a starting point, we have some demo code written in C++ that should get you on the right track:

http://www.crystalfontz.com/products/document/1035/635_WinTestSource_1_0.zip
 

CF Tech

Administrator
Thank you for your inquiry.

To talk to the CFA-635, you need to build up a valid packet, and send that packet to the CFA-635.

The CFA-633 packets are defined in the data sheet.

http://www.crystalfontz.com/product/CFA635-TFE-KU1.html#docs

Please look for the "PACKET STRUCTURE" section starting on page 19.

You will need to correctly calculate the CRC in order for it to be a valid packet. There are several algorithms in the data sheet, starting on page 50.

What language are you using to program the Wavecom?
 

Dimdom

New member
Thank you for your answers. I've already checked the forum and I've read the posts about CFA635. My problem is that Wavecom needs a special command to send the data to a port, that is adl_fcmSendData. That is it uses special commands to manipulate flow to and from the ports. The language that Wavecom uses is C.
I appreciate if you have any idea about this..
 
USB LCD Displays - Graphic and Character LCDs with a Keypad

CF Tech

Administrator
If you start with this code:

http://www.crystalfontz.com/product/linux_cli_examples.html

and add in the WaveCom adl_fcmSendData call, it should work. For example, here is how the new send_packet() would look (based on the Wavecom doc found here):
Code:
void send_packet(void)
  {
  //In order to send the entire packet in one call to "write()", we
  //need to place the CRC packed against the data. If data_length
  //happens to be MAX_DATA_LENGTH, then the position of the CRC is
  //outgoing_response.CRC (like you would expect), but if data_length
  //is less, the CRC moves into the data area, packed into the first
  //unused data position.
  //
  //Create a pointer to the first unused data positions.
  word
   *packed_CRC_position;
  packed_CRC_position=
    (word *)&outgoing_response.data[outgoing_response.data_length];
  *packed_CRC_position=
    get_crc((ubyte *)&outgoing_response,outgoing_response.data_length+2,0xFFFF);
  //command, length, data[data_length], crc, crc
  [COLOR="Red"][B]adl_fcmSendData(HANDLE,(ubyte *)&outgoing_response,outgoing_response.data_length+4);[/B][/COLOR]
  }
You would need to set up a sample packet to send:
Code:
. . .
#include "typedefs.h"
#include "cf_packet.h" 
. . .
    //Send line 1 to the 635 using command 31
    outgoing_response.command = 31;
    outgoing_response.data[0]=0; //col
    outgoing_response.data[1]=0; //row
    memcpy(&outgoing_response.data[2],">>>This is line 1<<<",20);
    outgoing_response.data_length = 22;  //the col & row position + the 20 char data length
    send_packet();
You would also need to port one of the CRC examples from the data sheet or the Linux command line example.
 
Top