Here is an attempt to write the library. I extracted it from my working program. What do I do next ?
-- Title: Send Compulink Commands, JVC Audio equipment comunication layer -- Author: Maciej Kawalkowski, Copyright (c) 2013, all rights reserved. -- Adapted-by: -- Compiler: >=2.4g -- Revision: $Revision: 0001 $ -- -- This file is part of jallib (http://jallib.googlecode.com) -- Released under the ZLIB license (http://www.opensource.org/licenses/zlib-license.html) -- Sources : JVC Service Manual for Amplifier AX-90VBK (2938) page 8, JVC Manual -- (2992) page 32 -- http://www.sackstark.org/eigenheer/projects/compulink.pdf -- Unfortunately both the manuals and the link is misleading as there is an translation -- error from original Japaneese documents -- Description: Send Compulink commmands to JVC audio gear -- The command signal is in the form of bursts of impulses -- A signal that is high for 5ms and low for 5ms is interpreted as Low o zero bit -- A 5ms high followed by 15ms low signal is interpreted as High 1 bit -- The end of transmision is a 5ms high signal followed by a min of 25ms low signal -- Each transmision consists of 8 bits plus a end signal -- First 4 bits is the Address of the device sent MSB first -- Last 4 bits is the Command code sent MSB first. -- -- -- Directions for use of this library in application programs -- and aliases for Compulink line output: -- alias compulink_out is pin_D0 -- pin_D0_direction = output -- -- Use: -- send_compulink(Adress, Command) -- -- TODO: Recieve Compulink signals -- Transmission parameters are include delay --Prodedure to create the Low pulse procedure pulse_0 is compulink_out = high delay_1ms(5)-- 5 milieconds compulink_out = low delay_1ms(5)-- 5 milieconds end procedure -- procedure to create High pulse procedure pulse_1 is compulink_out = high delay_1ms(5)-- 5 milieconds compulink_out = low delay_1ms(15)-- 15 milieconds end procedure -- procedure to create end of transmision procedure pulse_stop is compulink_out = high delay_1ms(5)-- 5 milieconds compulink_out = low delay_1ms(25)-- 25 milieconds end procedure --XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --procedure to send adress and command to Compulink --XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX procedure send_compulink( byte in compulink_addr_tx, byte in compulink_cmd_tx ) is var bit my_addr_bit at compulink_addr_tx : 3 --point my_addr_bit at MSB of compulink_addr_tx var bit my_cmd_bit at compulink_cmd_tx : 3 --point my_cmd_bit at MSB of compulink_cmd_tx -- send address for 4 loop if (my_addr_bit == 0) then pulse_0 end if if (my_addr_bit == 1) then pulse_1 end if compulink_addr_tx = compulink_addr_tx << 1 -- Shift left by 1 end loop -- send command for 4 loop if (my_cmd_bit == 0) then pulse_0 end if if (my_cmd_bit == 1) then pulse_1 end if compulink_cmd_tx = compulink_cmd_tx << 1 -- shift left by 1 end loop -- send stop pulse pulse_stop end procedure On Monday, July 29, 2013 11:36:43 AM UTC-4, Maciej Kawalkowski wrote: > > Hi > > I am new to Jal and the community but want to share some learning. I > created some code to communicate with JVC Compulink Audio devices. I would > like to create a library for others to use if they need it. How to I do > that ? Maybe this is already explained somewhere ? Cant seem to find it. > > > Maciej > -- You received this message because you are subscribed to the Google Groups "jallib" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/jallib. For more options, visit https://groups.google.com/groups/opt_out.
