Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

C code to Bascom

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> Various
View previous topic :: View next topic  
Author Message
Flash

Bascom Member



Joined: 03 Feb 2006
Posts: 152
Location: EU

blank.gif
PostPosted: Thu Dec 13, 2018 2:00 pm    Post subject: C code to Bascom Reply with quote

I need help with converting code below into Bascom code;

Code:
float sample;
int incCount;
BYTE Frame[132];

sample = (Frame [incCount*2-1]<<8|Frame[incCount*2]) * 0.6555755;


Sample is data received via UART (32 bytes+ header + crc)

Thanks

_________________
A clever person solves a problem. A wise person avoids it. Albert Einstein
Back to top
View user's profile
Paulvk

Bascom Member



Joined: 28 Jul 2006
Posts: 1160
Location: SYDNEY

australia.gif
PostPosted: Fri Dec 14, 2018 8:07 am    Post subject: Reply with quote

I send a command to my inverter and get a response back
they both contain CRCs
code is here https://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewtopic&t=13341&highlight=solar+inverter

Regards Paul
Back to top
View user's profile
Flash

Bascom Member



Joined: 03 Feb 2006
Posts: 152
Location: EU

blank.gif
PostPosted: Wed Dec 19, 2018 2:20 pm    Post subject: Reply with quote

Thanks!
_________________
A clever person solves a problem. A wise person avoids it. Albert Einstein
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> Various All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum