It looks to me like the :
StartH CON %11010111 ' High 8 bits of start frame
is getting read out backwards, as it is incrementing from bit 0 to 47. I think you need to change some things so it gets read out forward.
It looks to me like the :
StartH CON %11010111 ' High 8 bits of start frame
is getting read out backwards, as it is incrementing from bit 0 to 47. I think you need to change some things so it gets read out forward.
http://www.scalerobotics.com
Yeah, didn't think that one thru all the way - apparently. But you're smart enought to move things around so the bits come in the right order.
I reverse ... something, and the results are Ok (in Proteus) ! Hope to testing soon if work ! Thank You all ! I will post the results !
Code:;StartH CON %11010111 ' High 8 bits of start frame StartH CON %11101011 StartM CON %11011011 ' Middle 8 nits of start frame ;StartL CON %10101011 ' Low 8 bits of start frame StartL CON %11010101 '------------------------------------------------------------------------ VolUpH CON %11011011 ' High 8 bits of command ;VolUpM CON %11010110 ' Middle 8 nits of command VolUpM CON %01101011 ;VolUpL CON %11010101 ' Low bit of command + 7bits END of frame VolUpL CON %10101011
Mr.Henrik Olsson : THANK YOU ! With some minors modification (reversing order ; changes in KeyPad2.pbp ; adding input/output timming), the code work PERFECT !!!
I have all information about code for JVC remote : http://www.avforums.com/forums/car-e...l#post16560076
The code is ... SO BIG....
This is how commands look :
where the <C>s should be replaced by:Code:11111111000000000000000011111111 01110111011101110101010111<C>0111 11111111111111111111111111111111 01110111011101110101010111<C>0111 11111111111111111111111111111111 01110111011101110101010111<C>0111 11111111111111111111111111111111
How #*&^%$#@"_)_ can write this in PBP ? I can figure out...Any help will be wellcome ! Thanks !Code:0x04 Vol+ 01010111101010101 0x05 Vol- 01111010111101010101 0x08 Source 01010101111010101 0x0D Sound 01111010111101111010101 0x0E Mute 01011110111101111010101 0x12 Skip fwd or Right 01011110101011110101 0x13 Skip back or left 01111011110101011110101 0x14 Skip fwd hold or Up 01010111101011110101 0x15 Skip back hold or down 01111010111101011110101
Last edited by fratello; - 9th March 2012 at 09:31.
In front of each <Command> it's this : 00000000000000001111111101110111011101110101010111 <C>
How can be writting, more "elegant" this :
Code:timp con 536 ... portb.x = 0 pauseus 8584 ; 16 x 536,5 us portb.x = 0 pauseus 4292 ; 8 x 536,5 us portb.x = 0 pauseus timp portb.x = 0 pauseus 1610 ; 3 x 536,5 us portb.x = 0 pauseus timp portb.x = 0 pauseus 1610 portb.x = 0 pauseus timp portb.x = 0 pauseus 1610 portb.x = 0 pauseus timp portb.x = 0 pauseus 1610 portb.x = 0 pauseus timp portb.x = 0 pauseus timp portb.x = 0 pauseus timp portb.x = 0 pauseus timp portb.x = 0 pauseus timp portb.x = 0 pauseus timp portb.x = 0 pauseus timp portb.x = 0 pauseus 1610
Hi,
As last time this is completely untested. This builds and sends the command in steps which means that there will be some delay between the "preamble", "command" and "postamble". I don't know how tight the timing has to be so doing it this way may or may not work.Again, not tested so take it for what it is.Code:'**************************************************************** '* Name : Fratello_JVC.pbp * '* Author : Henrik Olsson * '* Notice : * '* : * '* Date : 2012-03-12 * '* Version : 1.0 * '* Notes : * '* : * '**************************************************************** i VAR BYTE j VAR BYTE OutBuffer VAR BYTE[8] BitsToSend VAR BYTE Main: For j = 0 to 10 GOSUB VolUp Pause 1000 NEXT FOR j = 0 to 10 GOSUB VolDn PAUSE 1000 NEXT GOTO Main SendPreamble: ' 00000000 00000000 11111111 01110111 01110111 01010101 11 ' Each individual byte reversed: OutBuffer[0] = %00000000 OutBuffer[1] = %00000000 OutBuffer[2] = %11111111 OutBuffer[3] = %11101110 OutBuffer[4] = %11101110 OutBuffer[5] = %10101010 OutBuffer[6] = %00000011 BitsToSend = 50 GOSUB SendBits RETURN '----------------------------------------------------------------------- SendPostAmble: ' 01111111 11111111 11111111 11111111 11110111 01110111 01110101 010111 OutBuffer[0] = %11111110 OutBuffer[1] = %11111111 OutBuffer[2] = %11111111 OutBuffer[3] = %11111111 OutBuffer[4] = %11101111 OutBuffer[5] = %11101110 OutBuffer[6] = %10101110 OutBuffer[7] = %00111010 BitsToSend = 54 GOSUB SendBits RETURN '----------------------------------------------------------------------- '----------------------------------------------------------------------- VolUp: GOSUB SendPreAmble ' 01010111 10101010 1 ' Each individual byte reversed OutBuffer[0] = %11101010 OutBuffer[1] = %01010101 OutBuffer[2] = %00000001 BitsToSend = 17 GOSUB SendBits GOSUB SendPostAmble RETURN '----------------------------------------------------------------------- '----------------------------------------------------------------------- VolDn: GOSUB SendPreAmble ' 01111010 11110101 0101 ' Each individual byte reversed OutBuffer[0] = %01011110 OutBuffer[1] = %10101111 OutBuffer[2] = %00001010 BitsToSend = 20 GOSUB SendBits GOSUB SendPostAmble RETURN '----------------------------------------------------------------------- '----------------------------------------------------------------------- SendBits: BitsToSend = BitsToSend - 1 For i = 0 to BitsToSend PortB.0 = OutBuffer.0[i] PauseUs 536 NEXT RETURN '-----------------------------------------------------------------------
/Henrik.
Hi! I am from Turkey. Taken in the forum I read that you are running on the remote control for Alpine.What did you use microcontrollers. I worked very hard, but did not succeed. Can you give pbp code for alpine? My adress is [email protected] Thanks.
Bookmarks