Advertisement

SHARP
POCKET COMPUTER
User Manual/ Interface
SHARP PC-G850V(S) Manual
MODEL
PC-G850V(S)
1

Advertisement

Table of Contents
loading

Summary of Contents for Sharp PC-G850VS

  • Page 1 SHARP PC-G850V(S) Manual SHARP POCKET COMPUTER MODEL PC-G850V(S) User Manual/ Interface...
  • Page 2 SHARP PC-G850V(S) User Manual - Appendix A: 11-Pin Interface Copyright © 2016 spellbound Version 1.1, 12/2016...
  • Page 3 SHARP PC-G850V(S) User Manual - Appendix A: 11-Pin Interface Appendix A: 11-Pin Interface Signals and Pin-Out On the left side of the PC-G850V(S) there is an 11-pin interface intended for communication with other devices. It is a multi-functional interface, hence it can operate in different (sub-)modes. The actual mode is selected through operational commands or menue items of the PC-G850V(S).
  • Page 4 SHARP PC-G850V(S) User Manual - Appendix A: 11-Pin Interface SIO-Mode: RS-232 Standard and Conventions The PC-G850V(S) in SIO-mode exposes the signals of the RS-232 standard, but with different voltage levels (see below). This section provides the necessary basics of the standard and covers some specifics of the PC-G850V(S). Within the RS-232 standard the terms DTE (Data Terminal Equipment) and DCE (Data Communication Equipment) are introduced.
  • Page 5 SHARP PC-G850V(S) User Manual - Appendix A: 11-Pin Interface The pin-out and meanings are summarized in the following table. Signal Name Alternative Direction Semantics Pin# Pin# Name (DTE- DB-9 DB-25 View) Transmitted Data Data from DTE to DCE Received Data Data from DCE to DTE Request To Send...
  • Page 6 Active So the PC-G850V(S) exposes inverted UART-TTL level signals in SIO-mode, just as most other SHARP pocket computers do. That means the logic is identical to the RS-232 standard (HIGH=0/active), but the voltage level is TTL. ð In order to connect peripheral devices with the PC-G850V(S) that operate at...
  • Page 7 SHARP PC-G850V(S) User Manual - Appendix A: 11-Pin Interface SIO-Mode: Data Transfer Cable CE-T800 and CE-T801 The data transfer cables CE-T800 and CE-T801 are RS-232 level converters with an integrated null-modem wiring. They can be used to connect the PC-G850V(S) to a personal computer (PC) or other devices. With these cables you can transfer data, program source-code or machine language programs from or to a PC by using the TEXT/Sio-submenue or the SIO-commands (R, W) of the integrated hex-monitor (MON).
  • Page 8 SHARP PC-G850V(S) User Manual - Appendix A: 11-Pin Interface SIO-Mode: USB PC-Adaptor Cable with Hardware-Handshake An elegant, hence powerful DIY-alternative for the connection of the PC-G850V(S) with a modern PC is based on a pre-built USB-UART adaptor cable with open endings. Specification: FTDI USB-UART/TTL adaptor cable based on FT232R-chip, 5V, 6 pins (GND,5V,RXD,TXD,RTS,CTS) For physical connection with the 11-pin interface of the PC-G850V a common multi-pin- connector with 2.54mm spacing can be used.
  • Page 9 SHARP PC-G850V(S) User Manual - Appendix A: 11-Pin Interface SIO-Mode: RS-232 Printer With the SIO-mode you can also make use of printers that provide an RS-232 interface, like the 4-color plotter CE-515P or CE-516P. Do not connect an RS-232-printer to the PC-G850V(S) without a voltage level converter! The data transfer cable/converter CE-T800/801 can be used in combination with a null- modem wiring or adaptor.
  • Page 10 SHARP PC-G850V(S) User Manual - Appendix A: 11-Pin Interface SSIO-Mode The SSIO-mode serves for the purpose of synchronous serial data transfer – in contrast to the asynchronous serial data transfer of the SIO-mode. “Synchronous” means, that the sender provides an additional strobe/clock signal, to which the receiver aligns. This makes an explicit baud-rate obsolete, to which both sides have to be configured in SIO- mode.
  • Page 11 SHARP PC-G850V(S) User Manual - Appendix A: 11-Pin Interface The following diagram shows the signal timing for the command LPRINT"X" with the CE- 126P connected: The PC-G850V(S) is waiting for ACK going HIGH before BUSY is set to HIGH for each clock pulse. This synchronous, serial protocol is also used by the CE-126P interface of the PC-E500(S).
  • Page 12 SHARP PC-G850V(S) User Manual - Appendix A: 11-Pin Interface The signal semantics of the LPRT-protocol is as follows: Signal Direction Semantics BUSY Frame-indicator for each transmitted byte DOUT Data line XOUT Clock pulse with pause after each byte LOW: Receiver ready HIGH: PC-G850V(S) must wait The next diagram shows the signal timings: Data is transferred byte-wise with MSB-first.
  • Page 13 SHARP PC-G850V(S) User Manual - Appendix A: 11-Pin Interface This is the signal-semantics within the CE-126P tape protocol: Signal Direction Semantics BUSY Clock pulse for synchronous, serial handshake DOUT Data line for handshake PWM data from the cassette interface (load) XOUT Handshake: See CE-126P printer protocol Data: PWM transfer to the cassette interface (save)
  • Page 14 SHARP PC-G850V(S) User Manual - Appendix A: 11-Pin Interface PIO-Mode The PIO-mode is primarily intended for the purpose of controlling external digital hardware, rather than for data communication with other devices. With this mode you change the pocket computer into a microcontroller with an on-board development environment. The 11-pin interface becomes a programmable 8-bit port. The logic levels (LOW/HIGH) can be set and read by the PIO-API (API = Application Programming Interface) in BASIC or C.
  • Page 15 SHARP PC-G850V(S) User Manual - Appendix A: 11-Pin Interface The following C-program implements these requirements: #define BOOL char #define TRUE #define FALSE 0 #define BTN 0x02 char BTNstate = 0; char LEDstate = 0; BOOL setupPIO() { if(!fopen("pio","a+")) { printf("can't open port\n"); return FALSE; pioset(BTN); return TRUE; BOOL pressed() { BOOL rtn=FALSE;...
  • Page 16 SHARP PC-G850V(S) User Manual - Appendix A: 11-Pin Interface Comments on the code: • Line 4: Bit-mask for bit-1 (0b00000010), i.e. push button input • Line 6: Global state variable for the push button • Line 7: Global state variable for the LED • Line 11: The interface is opened in PIO-mode for read and write.
  • Page 17 SHARP PC-G850V(S) User Manual - Appendix A: 11-Pin Interface PIC-Mode The PIC-mode of the PC-G850V(S) is used for the transfer of an assembled PIC- program to a PIC microcontroller. This process is called PIC-programming, PIC-program (up)loading or PIC-burning, since a specific “burning” voltage is needed that is much higher than normal operating voltage.
  • Page 18 SHARP PC-G850V(S) User Manual - Appendix A: 11-Pin Interface The following image shows the pin-out of a PIC16F84A as a representative: The PIC-loader of the PC-G850V(S) supports the ICSP-protocol as stated above, but preceding to that there is a connection test phase. If it fails, the programming process stops and the message Connection error! is shown on the display.
  • Page 19 SHARP PC-G850V(S) User Manual - Appendix A: 11-Pin Interface 1. Connection test: The PC-G850V(S) sets DATAOUT to HIGH and checks, whether DATAIN is going HIGH as well. So both signals have to be connected, otherwise the ICSP-protocol will not be activated! 2. This is the ICSP-phase, entered by MCLR# = 12,5V, CLK = LOW, DATA = LOW.
  • Page 20 SHARP PC-G850V(S) User Manual - Appendix A: 11-Pin Interface Now an appropriate PIC-burner circuit for the 11-pin interface of the PC-G850V(S) is needed, that utilizes the integrated PIC-loader and supports the PIC16F8x microcontroller family. Such a circuit must match the follwing criteria at least: 1. The CP-signal must control the programming/burning voltage for the PIC.
  • Page 21 SHARP PC-G850V(S) User Manual - Appendix A: 11-Pin Interface In order to test the complete PIC programming process with the PC-G850V(S), the following, quite simple PIC-program can be used. It flashes an LED that is connected to the RB1-pin: 10 #include "p16f84a.inc" 20 __config 0x3ff1 ;CP_OFF & PWRT_ON & WDT_OFF & XT_OSC 30DELAY1 equ 0x08 ;delay counter 1...
  • Page 22 SHARP PC-G850V(S) User Manual - Appendix A: 11-Pin Interface After successful program upload, decouple the PIC from the burner circuit and install it within the following test circuit: This test circuit utilizes an external quarz < 4MHz as a clock. That corresponds to the setting of XT_OSC within the configuration word (0x3FF1) of the sample program (see specification of the PIC16F84A).

This manual is also suitable for:

Pc-g850v

Table of Contents