JP1 Remotes Forum Index JP1 Remotes


FAQFAQ SearchSearch 7 days of topics7 Days MemberlistMemberlist UsergroupsUsergroups RegisterRegister
ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in

chicony IR keyboard debug help
Goto page Previous  1, 2
 
Post new topic   Reply to topic    JP1 Remotes Forum Index -> JP1 - Keyboards
View previous topic :: View next topic  
Author Message
jon_armstrong
Expert


Joined: 03 Aug 2003
Posts: 1238
Location: R.I.P. 3/25/2005

PostPosted: Mon Nov 15, 2004 7:41 pm    Post subject: Reply with quote

Thanks John and Rob. While we are on a roll there was an Acer keyboard that needed the same thing (adding the second frame and toggling a bit) although a more complex protocol written by John.

Could you take a look. This will really help me understand the mechanics. I'm slow but I generally understand the logic:

http://www.hifi-remote.com/forums/viewtopic.php?p=22921#22921
_________________
-Jon
Back to top
View user's profile Send private message Send e-mail Visit poster's website
digitalcujo



Joined: 04 Nov 2004
Posts: 6

PostPosted: Tue Nov 16, 2004 1:34 am    Post subject: Reply with quote

the last post of upgrade code works great!
so in the future, if I want to learn more keyboard keys and update the function code, how do find the hex function code from the raw data?
thanks again!
-rusty
Back to top
View user's profile Send private message
mr_d_p_gumby
Expert


Joined: 03 Aug 2003
Posts: 1370
Location: Newbury Park, CA

PostPosted: Tue Nov 16, 2004 2:02 am    Post subject: Reply with quote

The Robman wrote:
In S3C8 protocols, the input data always starts with the R03 register and there can be up to 10 bytes of input data. If the protocol is setup for 3 fixed bytes and 2 variable bytes (which would mean the 2nd byte of the protocol would be "32"), the fixed data would come in via registers R03, R04 and R05, and the variable data would come in via registers R06 and R07.
A quickie PB tutorial for you Jon Smile

In PB, I've pre-assigned the name DCBUF to the first address of the device/command buffer, R03 in the case of the S3C8. You can then refer to the various bytes within the buffer using an offset value. So, using Rob's example above, the buffer is laid out as follows:

DCBUF: 1st fixed byte
DCBUF+1: 2nd fixed byte
DCBUF+2: 3rd fixed byte
DCBUF+3: 1st variable byte
DCBUF+4: 2nd variable byte

Let's say you want to load the second variable byte into register C0. Any one of these would work (and produce identical code):
Code:
LD   RC0,R07
LD   RC0,R03+4
LD   RC0,DCBUF+4
Hope this doesn't confuse things for you. Confused
_________________
Mike England
Back to top
View user's profile Send private message
jon_armstrong
Expert


Joined: 03 Aug 2003
Posts: 1238
Location: R.I.P. 3/25/2005

PostPosted: Tue Nov 16, 2004 6:26 pm    Post subject: Reply with quote

digitalcujo wrote:
... in the future, if I want to learn more keyboard keys and update the function code, how do find the hex function code from the raw data?


I'm on a trip, but when I get home, I can send you an Excel spreadsheet that will decode the learned commands, but it's really pretty easy:

This is the learned command for numeral 1:

+1014 -876 +208 -678 +208 -678 +208 -284 +208 -284 +208 -284 +208 -284 +208 -284 +208 -284 +208 -284 +208 -678 +208 -284 +806 -77224 +1014 -876 +208 -678 +208 -678 +208 -284 +208 -284 +208 -284 +208 -284 +208 -284 +208 -284 +208 -284 +208 -284 +208 -284 +806 -130264

You only need to worry about the first frame that is separated from the second by a -77224:

+1014 -876 +208 -678 +208 -678 +208 -284 +208 -284 +208 -284 +208 -284 +208 -284 +208 -284 +208 -284 +208 -678 +208 -284 +806 -77224

The

+1014 -876 is a lead-in

The first eight burst pairs are what I called the variable data
+208 -678 Logical 1
+208 -678 Logical 1
+208 -284 Logical 0
+208 -284 Logical 0
+208 -284 Logical 0
+208 -284 Logical 0
+208 -284 Logical 0
+208 -284 Logical 0

Or 11000000 that is 192 decimal or hex C0

+208 -284 Logical 0
+208 -678 Logical 1
+208 -284 Logical 0

This is the "device" code and the new protocol changes the 1 in the second frame to 0 that signifies a release. (But this has already been entered in KM Master and the protocol handles the middle bit.)

+806 -77224 is the Lead-out

So just calculate the first 8-bits and convert to hex. You need to add a "h" without the quotes to tell KM Master that it is a hex value or hC0.

Mike, thanks for the explanation, the disassembly/re-assembly feature in PB is really cool.
_________________
-Jon
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic       JP1 Remotes Forum Index -> JP1 - Keyboards All times are GMT - 5 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

Powered by phpBB © 2001, 2005 phpBB Group
Get Smart! the band's official homepage Rockabilly Central