Jump to content

CircuitNinja

Members
  • Posts

    1
  • Joined

  • Last visited

CircuitNinja's Achievements

Newbie

Newbie (1/4)

0

Reputation

  1. tl;dr see image attached, I hope it better describes the issue I am facing. I have a large buffer I would like to write, using I2C Protocol module. I can manually send hex values to the device correctly by inputting the hex values into the write buffer manually, e.g. h00, hA5, hFF. However the feature to load the buffer from a text or bin file has proven problematic for me. So I am aware that hex values require to be prepended with "h" when inputted to the write buffer, (this becomes especially important for ambiguous values which could be either decimal or hex (e.g. h18 to ensure hex 0x18) However, I have not found a way to successfully indicate to Waveforms that the values imported from the text or bin file are to be loaded pre-pended with "h". It always loads the values as though they were decimal. I have tried placing h18 for example in the txt file, but waveforms just chokes and doesn't load the buffer, when I add the "h". I have also tried to write a "binary" file. Where all values should be interpreted as hex. However, waveforms loads the input buffer from the file once again without the "h" add to each byte in the buffer. This leads to the issue of values being interpreted as decimal (base 10) rather than hex. Example: The "hex" value x18 in the binary file turns into hex 0x12 when actually written to i2c. > Is there something I am missing, is there a special format I can use in the txt file to have waveforms load the buffer with "h" prepended to the values? Alternately this may be a bug, and in that case I would suggest either an option to indicate to read all values from the loaded file as "hex" values - aka... prepend each value in the buff with "h" - or maybe Waveforms can be made smart enough to know that if "binary" file type is chosen in the dropdown to load the buffer correctly, with h.... for each byte.
×
×
  • Create New...