Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split keyboard based on let's split firmware #1191

Closed
xyxjj opened this issue Apr 1, 2017 · 6 comments
Closed

Split keyboard based on let's split firmware #1191

xyxjj opened this issue Apr 1, 2017 · 6 comments

Comments

@xyxjj
Copy link
Contributor

xyxjj commented Apr 1, 2017

i've been working on my handwired split 65% keyboard, with a modified let's split firmware. most of the keyboard works already, just that the last column, column 8 doesn't work at all, and #define MATRIX_COLS 9 doesnt seem to have any effect on my keyboard. there doesnt seem to be any issues when generating the hex file so I'm not sure where to find and fix the problem

@ahtn
Copy link
Contributor

ahtn commented Apr 3, 2017

If you want to get >= 8 COLS, you need to modify some of the code (as noted in the readme).

Here's the relevant things you'd need to change (for serial):

  • Here, the matrix is only using uint8_t -> matrix_row_t.
  • Change serial_slave_buffer_length to `((MATRIX_COLS+7)/8 *MATRIX_ROWS/2)
  • Change the master and slave code that transmits the matrix: master, slave. Just memcpy with the appropriate size.

There's probably some other thing's that I've missed, but that should get you started if you want to add this.

@xyxjj
Copy link
Contributor Author

xyxjj commented Apr 3, 2017

thanks answering my question! unfortunately, im not very well versed in coding (i can code as well as a rock), so im not sure what you mean with regards to the last point

@ahtn
Copy link
Contributor

ahtn commented Apr 3, 2017

A non-coding solution would be to rewire your key matrix so that it only uses 8 columns. It'd be pretty easy, just wire the 9th column as a row instead.

@benji877
Copy link

benji877 commented Jun 8, 2017

Could you elaborate more on your last point?

utrrrongeeb added a commit to utrrrongeeb/qmk_firmware that referenced this issue Jun 10, 2017
That is, <qmk#1191>, for the
Orthodox. This includes the initial orthodox config by @reddragond.

- per @ahtn recommendation, using memcpy for moving slave matrix to/from
  serial buffer
- serial slave buffer has been enlarged using sizeof(matrix_row_t)
- note: serial.h now includes matrix.h
- note:  matrix.c includes <string.h>
utrrrongeeb added a commit to utrrrongeeb/qmk_firmware that referenced this issue Jun 10, 2017
Based on initial OrthoDox (serial) config by @reddragond and others,
this attempts to add TWI (I2C) support.
Relevant: <qmk#1191>

- per @ahtn recommendation, using memcpy for moving slave matrix
  into slave sending buffer
- slave buffer has been enlarged using sizeof(matrix_row_t)
- note: i2c.h now includes matrix.h
- note: matrix.c includes <string.h>
utrrrongeeb added a commit to utrrrongeeb/qmk_firmware that referenced this issue Jun 11, 2017
- orthodox serial protocol now sends 9 bits per row, instead of 16.
  Technically it's using MATRIX_COLS, so it might work generically.
- ROW_MASK is #defined in serial.c to truncate the checksums to prevent
  overflows causing false errors. This macro should be renamed if it's
  kept.
utrrrongeeb added a commit to utrrrongeeb/qmk_firmware that referenced this issue Jun 26, 2017
- orthodox serial protocol now sends 9 bits per row, instead of 16.
  Technically it's using MATRIX_COLS, so it might work generically.
- ROW_MASK is #defined in serial.c to truncate the checksums to prevent
  overflows causing false errors. This macro should be renamed if it's
  kept.
jackhumbert pushed a commit that referenced this issue Jun 26, 2017
* Added orthodox

* Modified readme

* Modified readme

* Modified readme

* Updated makefile

* Fixed keymap issues

* Modified serial communications to allow for over 8 columns

* Fixed sizeof command

* Fixed some typing issues

* Testing issue #1191 (n-column split i2c slave)

Based on initial OrthoDox (serial) config by @reddragond and others,
this attempts to add TWI (I2C) support.
Relevant: <#1191>

- per @ahtn recommendation, using memcpy for moving slave matrix
  into slave sending buffer
- slave buffer has been enlarged using sizeof(matrix_row_t)
- note: i2c.h now includes matrix.h
- note: matrix.c includes <string.h>

* Added i2c keymap - right col still not working

* orthodox: re-added i2c keymap, based on serial

* orthodox / issue #1191: trying 9-bit serial

- orthodox serial protocol now sends 9 bits per row, instead of 16.
  Technically it's using MATRIX_COLS, so it might work generically.
- ROW_MASK is #defined in serial.c to truncate the checksums to prevent
  overflows causing false errors. This macro should be renamed if it's
  kept.

* Revert "Fixed sizeof command"

This reverts commit f62a5b9.

Changes had been made to the lets_split serial driver for testing which
mirrored the multi-byte-row changes made to support the orthodox. As the
lets_split does not require these changes, and new improvements had
been added to the orthodox port only, this commit reverts them.

Because the new code could potentially reduce latency over the serial
transport, it may be desirable to re-add in the future, by backporting
the current working orthodox code.

* orthodox: default serial keymap improvements

- formatting has been improved
- a few keys have been shifted, mainly in Raise and Lower layers,
  to be more like the default Planck layout
- Now available: F12, Home, End, PgUp, PgDn, Media-Next, Media-Play

Still To Do:
- duplicate for TWI
- Alt modifier
- GUI modifier

* orthodox: failed attempt at 16b/row TWI

- duplicated updated serial keymap for "i2c"
- removed string.h/memcpy, instead
- hardcoded copying of six bytes per update
- still doesn't work; master reports interconnect errors on txled

* orthodox: adjusted default keymap

- this is applied to both 'serial' and 'i2c' keymaps
- Alt and GUI have been added, as they were missing
- comma and period persist across more layers; Home/PgUp and End/PgDn
  have been moved slightly to accommodate

* orthodox: revert TWI support to minimum to debug

- disabled ssd1306 and hardware locking in build configuration
- increased TWI buffer from 0x10 to 0x20 bytes
- decreased TWI clock from 400000 to 100000
- removed hardcoded TWI multi-byte sending/receiving

An 'i2c' build of this was found to work on a rev1 Orthodox, although
slave-side col9 was understandably not working. When testing-time
permits, features will be gradually re-enabled towards getting the full
matrix supported over TWI.

* orthodox: TWI (i2c) is working, kludge for col9

The TWI interconnect ("i2c" in directories and build config) is now
working for the Orthodox, including the slave half's column #9.
This is intended as an interim solution, as it's a kludge, not a fix.

Rather than a working multi-byte implementation, the two col9 keys'
bits are packed-into and unpacked-from the two unused bits in row1.
Furthermore, the TWI clock constant has been reduced to 100000 from
400000, as testing revealed the higher value just didn't work.
Testing also found that (with this kludge) increasing the TWI buffer
was not necessary.

This commit leaves many commented-out lines in matrix.c from previous
testing, which will be removed in a future commit once the
interconnects' multi-byte problems have been debugged more thoroughly.

* orthodox: updated readme.md

The readme for the Orthodox now includes a description of the keyboard,
allusions to its author and availability, a linked photo, and links to
the evolving build guide and the current keymap on KLE.
This update has been prepared with /u/Deductivemonkee's assistance.
@drashna
Copy link
Member

drashna commented Mar 25, 2018

@benji877 The software matrix doesn't have to match the hardware matrix.

You may want to read this:
https://docs.qmk.fm/understanding_qmk.html

But you would basically set the PCB so that it had less than 8 columns, and remap the wiring to match.
It may/will make the PCB/wiring that much more complex, but it may be simpler than rewriting the code.

@drashna
Copy link
Member

drashna commented Oct 21, 2018

Well, the orthodox is doing this now. As is the quefrency from keeb.io.

I think it may be safe to close this now. If not, please reopen.

@drashna drashna closed this as completed Oct 21, 2018
mattpcaswell pushed a commit to mattpcaswell/qmk_firmware that referenced this issue Jun 7, 2023
…#1191)

* Add 'keyboard folder' button that redirects to...

... GitHub repository

* Move button to ControllerTop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants