Saturday, February 4, 2012

Propeller GUI

UPDATED, Feb 5, 2012 Rev C

I am planning a GUI for my Propeller Amateur Radio Projects. As show on the previous post, I have the hardware cobbled together, but was stuck on the strategy of assigning processor pin to the LCD Display and the Encoders. After more than several hours and reading conflicting strategies and OBJ(ect) module support documents. I decided to just pick a pin assignment and get things started. The wires that I will use behind the "Propeller Proto USB" board are small and can be changed if another more sensible strategy is discovered later. Note: first attempt was abandoned, this page has be updated.

See Propeller Object Exchange "jm_lcd4_ez" download file.

My current pin assignment plan is as follows:

Note: I have updated the following to reflect current project pin usage.



Schematics

       P8X32A
     ┌────┬────┐ 
     ┤0      31├ RS232         0V    5V    0V   P16   P17   P18   N/C   N/C
     ┤1      30├ RS232         │     │     │     │     │     │     │     │
     ┤2      29├ I2C           │VSS  │VDD  │VO   │R/S  │R/W  │E    │DB0  │DB1
     ┤3      28├ I2C           ┴1    ┴2    ┴3    ┴4    ┴5    ┴6    ┴7    ┴8
     ┤4      27├ RF         ┌────────────────────────────────────────────────┐  LCD 16X2
     ┤5      26├ Encdr1B    │ 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16│  HD44780-BASED
     ┤6      25├ Encdr1A    └────────────────────────────────────────────────┘  SSC2F16DLNW-E
     ┤7      24├ Encdr1P       ┬9    ┬10   ┬11   ┬12   ┬13   ┬14   ┬15   ┬16
     ┤VSS   VDD├               │DB2  │DB3  │DB4  │DB5  │DB6  │DB7  │A(+) │K(-)             
     ┤BOEn   XO├               │     │     │     │     │     │     │     │
     ┤RESn   XI├              N/C   N/C   P12   P13   P14   P15   5V    P19 via Transistor
     ┤VDD   VSS├                                                             and 2.2k 
     ┤8      23├ Encdr0B                                                  
 Kyd ┤9      22├ Encdr0A
KDit ┤10     21├ Encdr0P
KDah ┤11     20├ Speaker
 DB4 ┤12     19├ BackLight
 DB5 ┤13     18├ E
 DB6 ┤14     17├ RW
 DB7 ┤15     16├ R/S
     └─────────┘ 


PIN ASSIGNMENT
   VSS  - POWER SUPPLY (GND)
   VCC  - POWER SUPPLY (+5V)
   VO   - CONTRAST ADJUST (0-5V)
   R/S  - FLAG TO RECEIVE INSTRUCTION OR DATA (via 2.2k ohm)
            0 - INSTRUCTION
            1 - DATA
   R/W  - INPUT OR OUTPUT MODE (via 2.2k ohm)
            0 - WRITE TO LCD MODULE
            1 - READ FROM LCD MODULE
   E    - ENABLE SIGNAL (via 2.2k ohm)   
   DB0  - DATA BUS LINE 0 (not connected)    
   DB1  - DATA BUS LINE 1 (not connected)    
   DB2  - DATA BUS LINE 2 (not connected)    
   DB3  - DATA BUS LINE 3 (not connected)    
   DB4  - DATA BUS LINE 4 (via 2.2k ohm)
   DB5  - DATA BUS LINE 5 (via 2.2k ohm) 
   DB6  - DATA BUS LINE 6 (via 2.2k ohm) 
   DB7  - DATA BUS LINE 7 (via 2.2k ohm) (MSB)
   A(+) - BACKLIGHT 5V
   K(-) - BACKLIGHT - via 2.2K ohm and Transistor to GND, Base to P19 via 220 ohm Resistor




In addition to the above, I plan to use pin 19 for the LCD Backlight control (which is outside the scope of most published Objects), normally the backlight (LCD pin 15) is connected to a variable resister.

Note: Because the LCD is actually a TTL (5v) device, 2.2k ohm resisters are suggested in series with all data lines connected to the Propeller (a 3.3v device). These resistors will allow bidirectional level compatibility.

More research is needed before I assign of the Encoders and Speaker pins, but I think they will be in the 20 to 27 in range. My goal will be to reserve pins  0-7 for application I/O and 28-31 for standard Propeller Functions (i.e., I2C).

Note: There are many contributed OBJ's in the Propeller Object Exchange Library for an LCD Display, but many have conflicting pin assignments/usage. The above is just the strategy I selected.

UPDATE

The LCD Driver selection for my Arduino project GUI was much simpler - I have now invested about two days in this effort for the Propeller . And yet, the selected LCD driver does not always correctly initialize the LCD. More research and experimenting is necessary. :-(

--

No comments:

Post a Comment