Using the FV1Dev on Ubuntu and SpinAsm SOF: Difference between pages

From PedalPCB Wiki
(Difference between pages)
Jump to navigation Jump to search
(Created page with "This method has been tested on Ubuntu 18.04 LTS. Other versions may work, but have not been verified. == Installation == Open a Terminal window and enter the following: Step 1: '''Update package information''' <code> sudo apt-get update </code> Step 2: '''Install libusb''' <code> sudo apt-get install libusb-1.0 </code> Step 3: '''Install SRecord''' <code> sudo apt-get install srecord </code> Step 4: '''Download FV1Dev Bundle for Ubuntu''' http://wiki.pedalpc...")
 
No edit summary
 
Line 1: Line 1:
This method has been tested on Ubuntu 18.04 LTS.  Other versions may work, but have not been verified.
== SOF ==
{| class="wikitable"
|+
!Mnemonic
!Operation
!Instruction coding
|-
|SOF
|C * ACC + D
|CCCCCCCCCCCCCCCCDDDDDDDDDDD01101
|}


== Installation ==
====== Description ======
SOF will multiply the current value in ACC with C and will then add the constant D to the result. Please note the absence of an integer entry format for D. This is not by mistake but it should emphasize that D is not intended to become used for integer arithmetic. The reason for this instruction is that the 11 bit constant D would be placed into ACC left justified or in other words 13 bits shifted to the left. D is intended to offset ACC by a constant in the range from –1 to +0.9990234375.


Open a Terminal window and enter the following:
====== Parameters ======
{| class="wikitable"
|+
!Name
!Width
!Entry formats, range
|-
|C
|16 Bit
|Real (S1.14)
Hex ($0000 ­ $FFFF)
Symbolic
|-
|D
|11 Bit
|Real(S.10)
Symbolic
|}


Step 1: '''Update package information'''
====== Syntax ======
SOF C,D


<code>
====== Coding Example ======
sudo apt-get update
<syntaxhighlight line="1">
</code>
Off  EQU  1.0                  ;
 
                                ;
Step 2: '''Install libusb'''
; Halve way rectifier ­­­­­­­­
 
sof  0,0                        ; Clear ACC
<code>
rdax ADCL,1.0                  ; Read from left ADC channel
sudo apt-get install libusb-1.0
sof  1.0,Off                    ; Subtract offset
</code>
sof  1.0,Off                    ; Add offset
 
</syntaxhighlight>
Step 3: '''Install SRecord'''
 
<code>
sudo apt-get install srecord
</code>
 
Step 4: '''Download FV1Dev Bundle for Ubuntu'''
 
[[http://wiki.pedalpcb.com/files/FV1Dev-Ubuntu.zip Download FV1Dev Flash Tool]]
 
== Usage Notes ==
 
=== Read EEPROM data to .bin file ===
<code>
./ch341eeprom -s 24c32 -r <filename.bin>
</code>
 
=== Write .bin file to EEPROM ===
<code>
./ch341eeprom -s 24c32 -w <filename.bin>
</code>
 
=== Convert BIN to HEX ===
<code>
srec_cat <filename.bin> -binary -o <filename.hex> -intel
</code>
 
=== Convert HEX to BIN ===
<code>
srec_cat <filename.hex> -intel -o <filename.bin> -binary
</code>

Latest revision as of 20:54, 6 January 2023

SOF

Mnemonic Operation Instruction coding
SOF C * ACC + D CCCCCCCCCCCCCCCCDDDDDDDDDDD01101
Description

SOF will multiply the current value in ACC with C and will then add the constant D to the result. Please note the absence of an integer entry format for D. This is not by mistake but it should emphasize that D is not intended to become used for integer arithmetic. The reason for this instruction is that the 11 bit constant D would be placed into ACC left justified or in other words 13 bits shifted to the left. D is intended to offset ACC by a constant in the range from –1 to +0.9990234375.

Parameters
Name Width Entry formats, range
C 16 Bit Real (S1.14)

Hex ($0000 ­ $FFFF) Symbolic

D 11 Bit Real(S.10)

Symbolic

Syntax

SOF C,D

Coding Example
Off  EQU  1.0                   ; 
                                ; 
; Halve way rectifier ­­­­­­­­
sof  0,0                        ; Clear ACC 
rdax ADCL,1.0                   ; Read from left ADC channel
sof  1.0,Off                    ; Subtract offset 
sof  1.0,Off                    ; Add offset