HEX to BIN

Sorry, maybe stupid to ask(dig that has nothing to MOMA occupation), but almost all of the night Google search has not led to success.
Trying to flash the chip from the printer via the arduino
There is a Hex code
Here's a
45 32 21 50 4C 61 6E 63 00 00 01 00 01 00 00 01
00 00 00 00 00 00 00 02 00 00 32 34 30 32 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 90 00 F2 A3 01 00 00 00 00 00 00 00 00
00 00 00 58 45 52 4F 58 00 00 00 00 00 00 00 00
00 96 00 AF 00 00 C8 00 EA 00 EA C8 00 00 00 00
34 00 00 BC 00 00 50 46 00 38 00 4A 00 00 00 00
00 00 00 00 FF FF 00 4B 00 00 00 00 00 00 00 00
00 00 00 58 45 52 4F 58 00 00 00 00 00 00 00 00
00 96 00 AF 00 00 C8 00 EA 00 EA C8 00 00 00 00
34 00 00 BC 00 00 50 46 00 38 00 4A 00 00 00 00
00 00 00 00 FF FF 00 4B 00 00 00 00 00 00 00 00
00 00 00 58 45 52 4F 58 00 00 00 00 00 00 00 00
00 96 00 AF 00 00 C8 00 EA 00 EA C8 00 00 00 00
34 00 00 BC 00 00 50 46 00 38 00 4A 00 00 00 00
00 00 00 00 FF FF 00 4B 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 FF FF FF 00 FF
FF 01 44 00 04 00 00 10 13 11 20 CD 20 00 00 11
04 52 08 20 FF FF FF FF 0A

Which should be written into the chip.
Record work, but not his, and byte data type in the form 0x58 or 1011000.
All conversely what I found as something not to do, but in the form 0x58 nothing was given.
October 3rd 19 at 16:48
2 answers
October 3rd 19 at 16:50
Solution
yadi.sk/d/OBk9aVOo2tU1p that You would like to receive?
No, it's a hex -> ASCII, so I know how, and need to be written something like "0x58 or 1011000" - Cortez29 commented on October 3rd 19 at 16:53
give me an example please, I don't really understand what you need - Violet_Wiso commented on October 3rd 19 at 16:56
pastebin.ru/07fUmQoe so? - Violet_Wiso commented on October 3rd 19 at 16:59
Yes, thank you, it is, and after so you can make one yourself? - Cortez29 commented on October 3rd 19 at 17:02
well, I skriptik in PHP, dashed
<?php
$c=file_get_contents('/tmp/hex');
$c=preg_replace("/[ \n]+/m", ',',$c);
$data=explode(',',$c);
foreach ($data as $d){
$n=hexdec($d);
 echo decbin($n).' ';
}
?>
- Violet_Wiso commented on October 3rd 19 at 17:05
Thank you - Cortez29 commented on October 3rd 19 at 17:08
October 3rd 19 at 16:52
Or just paste the code into a text editor and the AutoCorrect replace spaces with "0x". Where gnarled turned out correct manually.
Yes, I too thought over this variant, since observations have shown that like enough to add 0x, and then thought that maybe it's not always how it works, and instead of 0 you have to write something else, and decided to discard it. - Cortez29 commented on October 3rd 19 at 16:55

Find more questions by tags ProgrammingHexArduinoMicrocontrollers