MAX7456 OSD

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
User avatar
JonnyW
Posts: 1230
Joined: Fri Oct 29, 2010 9:13 am
Location: Matrix Multimedia Ltd
Has thanked: 63 times
Been thanked: 290 times
Contact:

MAX7456 OSD

Post by JonnyW »

Is there anybody that got the MAX7456 OSd working in Flowcode. I The SPI usage is not clear at all to me. Then I am a newbie more used to BASCOM.
The MAX7456 also has NVram but do I have to set the CS manual or can i use NVM set and get.
Thanks

georgp

Hi George - looks like I deleted one of the posts at the same time as Jac deleted the other! Apologies for this. As there is no undo on the forum for this, I have re-posted your topic here.

Jonny

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: MAX7456 OSD

Post by Benj »

Hello,

I would control the CS line yourself using an output icon in single bit mode, near the start of your program be sure to set the CS pin so it defaults to high. Clear the CS pin at the start of the transaction, then send and receive the SPI bytes according to the device protocol and finish by disabling the CS pin.

Let us know how your getting on.

georgp
Posts: 37
Joined: Tue Sep 03, 2013 8:29 am
Has thanked: 8 times
Been thanked: 4 times

Re: MAX7456 OSD

Post by georgp »

Thanks yes this part I am doing but if I look at this
"WRITEDAT:'SHIFTS DATA TO DISPLAY CHIP
Low CS 'ENABLE = LOW CHIP SELECT
SHOut SDIN , SCLK , msbfirst_h , [LOADDAT\16] 'WRITE 16 BIT DATA
High CS 'DISABLE = HIGH CHIP SELECT
Return
How do I translate this.
Evert Dekker did some nice work in Bascom but to get something like this to Flowcode.
http://evertdekker.com/Joomla/index.php ... &Itemid=84
Thanks

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: MAX7456 OSD

Post by Benj »

Hello,

You can do something like this where data16 is the 16-bit data to send and MSB and LSB are byte variables.

MSB = data16 >> 8
LSB = data16 & 0xFF

Output 0 to CS pin
Send Byte MSB
Send Byte LSB
Output 1 to CS pin

Post Reply