Commit Graph

26 Commits

Author SHA1 Message Date
854876217a Update the serial console as to mimic the LCD
Working for clear screen, Backspace, and newline. Still needs to be
implemented to match the columns and rows of the LCD (which will require
that lcdLib.c provide access to currentLineChars and currentLineNum via
functions like getCurrentRow and getCurrentColumn.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-10-08 03:15:25 -04:00
8ab9c5a4b0 Add transmitString function to USART library
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-10-08 03:15:00 -04:00
3d3b9ab5fb Working backspace and fixed bug with cursor
Before this commit the cursor would be incremented (automatically by
hardware) after printing the last character on the line, which would
leave it the next line in memory, which doesn't necessarily correspond
to the next physical line on the display. This would be corrected when
the next character is received but is incorrect behavior; the cursor
should always be at where the next character is to inserted. This was
due to an off-by-one logical error. This commit solves this bug.

Along with the bug fix, keycodes from the serial terminal are now
deciphered correctly and the corresponding key or keys are sent to the
LCD accordingly.

Further work is required with regards to updating the serial
console (the connected client) so that their serial console looks
exactly like the LCD they are connected to.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-10-07 22:38:57 -04:00
3a6800a2b0 Remove showPrases from startup
No longer show phrases (was used during testing).

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-10-07 22:38:11 -04:00
172d5e268f Prepare to support various escapes for characters
Move code that checked for escapes from the writeStringToLCD function to
the writeCharToLCD function.

Note: There seems to be an issue connecting to USART when the programmer
is not connected. This is likely a wiring issue related to ISP.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-10-06 05:49:59 -04:00
208d90f4ef Initial USART echoing to LCD example
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-10-06 04:23:40 -04:00
85c7948848 Fix BAUD rate in Makefile
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-10-06 04:23:14 -04:00
435c8eb07b Fixed busy flag check
Inspired by
http://web.alfredstate.edu/weimandn/programming/lcd/ATmega328/LCD_code_index.html.
Forgot about the 'data hold time', 'address hold time' and 'enable cycle
time'. These delays should eventually be implemented as preprocessor constants.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-10-06 03:34:39 -04:00
abacb2b30a Take screen characteristics into account
The writeStringtoLCD function now wraps text correctly and proceeds to
the next line when '\n' is reached in its argument.

Note: during debugging of this feature it was noticed that the function
loop_until_LCD_BF_clear is broken, as previously suspected. This forces
delays to be placed in the clearDisplay and returnHome functions and
could cause other undefined behavior if timing requirements aren't met.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-10-06 03:14:24 -04:00
45797f1164 Refactor lcdLib.h
Move mode and settings sanity check to end of file.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-10-05 05:03:26 -04:00
68d60151dc Initial commit to branch; split done but untested
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-10-04 22:49:15 -04:00
2a1073f658 Code cleanup of lcdLib.h
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-10-04 21:20:51 -04:00
a7f83fbe63 Add *.lst to .gitignore
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-10-04 21:20:23 -04:00
8281b3c28e Forgot to turn off FOUR_BIT_MODE after testing
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-10-02 03:46:57 -04:00
e5cc008cc7 Code cleanup/commenting
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-10-02 03:46:44 -04:00
c52fa746e0 Removed repeated #defines for data lines
Removed the repeated #defines for LCD_DBUS*[,_PORT,_DDR,_PIN] used for
both FOUR_BIT_MODE and EIGHT_BIT_ARBITRARY_PIN_MODE.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-10-02 03:27:57 -04:00
569316a8ae Fixed init issue with EIGHT_BIT_ARBITRARY_PIN_MODE
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-10-02 03:27:13 -04:00
9fda49a40a Forgot to change back to default mode after tests
After trying FOUR_BIT_MODE to ensure it worked properly, forgot to
comment it out so that the default mode is enabled as expected and
documented.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-10-02 02:48:42 -04:00
04be2b85da Tested operational 4-bit mode
Cleaned up a few comments and tested and verified operation of 4-bit mode.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-10-02 02:46:23 -04:00
0a36d6cf77 All 8-bit modes functional
Tested mode 1 (default 8-bit mode), and mode 2 (8-bit mode with
arbitrary pins for the data lines).

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-10-01 04:06:08 -04:00
fc0de88b8e Finished (but untested) modes
1. Default mode (8-bit data bus, control lines on any PINs)
2. 8-bit arbitrary pin mode (8-bit data bus on any PIN, control lines on
   any PINs)
3. 4-bit mode (4-bit data bus, control lines on any PINs)

Default mode is tested and working. The others still require testing.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-10-01 03:43:07 -04:00
5777e2b831 Prepare for 4 bit mode of operation
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-10-01 03:04:33 -04:00
3ba737fc7b Fixed timing issues, working again
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-09-30 05:02:43 -04:00
047c4b5c31 Broken likely due to timing
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-09-30 04:46:49 -04:00
1acda4a55a Some cleanup
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-09-29 06:06:37 -04:00
bfb78be425 Initial commit
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-09-29 02:48:09 -04:00