background image

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. To connect the CE-515P/516P via RS-232 a DIN-4 plug is 
needed. The correct wiring (inluding null-modem) is as follows: 
 
 

                                                                                                         

 

 
Be sure to have the DIP-switches on the back side of the CE-515P/516P configured 
correctly (see printer manual for details). 
Furthermore you have to adopt the RS-232 parameters in the TEXT/Sio/Format sub-
menue of the PC-G850V(S) in order to get a connection with the CE-515P: 
 

  baud rate   = 1200 

  data bit 

= 8 

  stop bit 

= 1 

  parity   

= none 

  end of line   = CR 

  flow   

= RS/CS 

 
Now, to actually direct outputs to a RS-232-printer, you have to open the 11-pin interface 
explicitely in SIO-mode (

OPEN“COM:“

) – and close it after use (

CLOSE

). Character-

strings and control codes are transmitted via the 

PRINT#1,“...” 

command in 

between. 
 

OPEN“COM:“ 
PRINT#1,“HELLO WORLD“ 
… 

CLOSE 

 
The commands 

LPRINT

LLIST

LFILES

 however are not routed to the 11-pin interface 

in SIO-mode. 
 
 

 

 

DIN-4 Plug 

CE-T800/1 DB-25 Plug 

Pin#  Signal 

Pin#  Signal 

+12V 

BUSY# 

RTS 

GND 

GND 

DATA# 

RXD 

 

Summary of Contents for PC-G850V

Page 1: ...SHARP PC G850V S Manual 1 SHARP POCKET COMPUTER MODEL PC G850V S User Manual Interface ...

Page 2: ...SHARP PC G850V S User Manual Appendix A 11 Pin Interface 2 Copyright 2016 spellbound Version 1 1 12 2016 ...

Page 3: ...Programmable 8 bit parallel port interface 5 PIC mode activated by the PIC loader in the assembler menue Programming interface for PIC microcontrollers The association of physical pins to logical signals called pin out as well as the configured direction for input I or output O depends on the active mode The following table gives an overview Looking from the left side of the PC G850V S pin 1 is th...

Page 4: ...32 standard the terms DTE Data Terminal Equipment and DCE Data Communication Equipment are introduced The DTE is the PC G850 for example and the DCE is a modem or another peripheral device like a serial printer When two computers shall communicate directly i e without a modem you need a so called null modem cable adaptor which connects the outputs of one DTE with the inputs of the other and vice v...

Page 5: ... the DTE computer requests the DCE modem for permission that the DTE may send data and the DCE answeres via CTS But this protocol is asymmetric because the DTE has no means to notify the DCE to wait for internal computations when the DCE sends data For this reason Request To Send was re claimed The DTE requests the DCE to send data or in other words the DTE is Ready To Receive RTR RTR and CTS are ...

Page 6: ...top Inactive HIGH 5V 0 Space Start 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 RS 232 voltage levels a level converter is mandatory The state of ...

Page 7: ...ted directly to a PC if necessary via a DB 9 adaptor when there is a physical COM port Alternatively it can be connected to a USB port through an additional serial to USB adaptor Don t use a null modem adaptor or wiring for a PC connection because it s already integrated in the cable However if a peripheral RS 232 device like the 4 color plotter CE 515P shall be connected a null modem adaptor wiri...

Page 8: ...C G850V S Signal Pin GND black GND 3 RXD yellow TXD 7 TXD orange RXD 6 CTS brown RTS 4 RTS green CTS 9 VCC red Additionally there should be a 10kOhm resistor between pin 4 and pin 3 of the multi pin connector It serves as a pulldown for the RTS signal to get a defined LOW level Without it you might experience I O errors when transferring data from a PC to the PC G850V S because the PC may not rece...

Page 9: ...k side of the CE 515P 516P configured correctly see printer manual for details Furthermore you have to adopt the RS 232 parameters in the TEXT Sio Format sub menue of the PC G850V S in order to get a connection with the CE 515P baud rate 1200 data bit 8 stop bit 1 parity none end of line CR flow RS CS Now to actually direct outputs to a RS 232 printer you have to open the 11 pin interface explicit...

Page 10: ... protocol for the printer CE 126P and it is active if and only if there is no other sub mode selected The commands LPRINT LLIST and LFILES are routed to the printer in this mode The integrated cassette interface of the CE 126P can also be used by the PC G850V S and the respective protocol shares the handshake with the print protocol but it uses PWM for data transfer instead of SSIO see below The p...

Page 11: ...he SSIO mode into two groups three signals bits each Mini I O output port 3 bit o XOUT bit 0 o DOUT bit 1 o BUSY bit 2 Mini I O input port 3 bit o ACK bit 0 o DIN bit 1 o XIN bit 2 The bits of the mini I O port can be controlled explicitly via the functions OUT miniput and INP miniget so that e g custom communication protocols can be implemented on that basis Besides that the PC G850V S provides a...

Page 12: ... rising edge of the clock pulse The BUSY signal provides an additional reference frame for each byte PWM Mode CE 126P Tape Protocol This protocol is activated by the commands BSAVE BSAVEM BLOAD BLOADM BLOAD when a CE 126P or compatible cassette interface is attached in order to store load or verify BASIC programs or binary data sections e g machine language programs to from a tape recorder like th...

Page 13: ...ing a BASIC program with only one line The dynamics for a BLOAD operation is equivalent but the PWM data is received through the XIN signal then PWM Mode Generic PWM Protocol This protocol is equal to the CE 126P tape protocol reduced to XOUT and XIN It is activated by the commands BSAVE BSAVEM BLOAD BLOADM BLOAD when no CE 126P or compatible cassette interface is connected Typically this would be...

Page 14: ...bit to 0 LOW or 1 HIGH Signals that were configured as input are ignored then The function pioget PIOGET reads all 8 logic levels of the port into one byte In order to demonstrate the PIO mode usage here is a very simple example In this example bit 0 pin 4 is an output which lights up an LED when it is in the HIGH logic 1 state Bit 1 pin 5 on the other hand serves as an input that represents the s...

Page 15: ... port n 13 return FALSE 14 15 pioset BTN 16 return TRUE 17 19 20 BOOL pressed 21 BOOL rtn FALSE 22 char btn 23 btn pioget BTN 24 if btn BTNstate 0 25 rtn TRUE 26 BTNstate btn 27 return rtn 28 29 30 toggleLED 31 LEDstate LEDstate 32 printf LED x n LEDstate 33 pioput LEDstate 34 39 100 main 101 printf PIO test n 102 if setupPIO 103 abort 104 while TRUE 105 if pressed 106 printf button pressed n 107 ...

Page 16: ...it 1 pin 5 as input All other signals are outputs Line 20 This function detects the transition from bit 1 0 to bit 1 1 i e the close event of the push button Line 23 The PIO port is read and all bits are masked out except bit 1 Line 30 This function changes the state of the LED Line 33 The new LED state bit 0 is written to the port Unused outputs are set to 0 Line 104 Main loop abort by ON BREAK k...

Page 17: ... provided at the MCLR pin of the PIC If this signal is LOW the MCLR pin must be at GND level or VDD 5V 5 CLK Out This signal provides the ICSP clock pulse for the PIC to be programmed However the inverted CLK i e CLK signal must be provided at the RB6 input pin of the PIC The latter latches data bits on the falling edge of that CLK pulse 6 DATAIN In This input must be connected with the RB7 pin of...

Page 18: ...oader dynamics we take a minimalistic example code for the PIC16F84A It just consists of the configuration word and an infinite loop without body 10 include p16f84a inc 20 __config 0x3ff6 30loop goto loop The PIC assembler compiles this source code into a PIC machine language program with only one PIC word 14 bit The next diagram shows the phases of a successful burning process controlled by the i...

Page 19: ...the PIC configuration word This diagram is a zoom in of phase 2a PIC ICSP commands are 6 bit wide see specification of your PIC A command can be followed by a data word writing or reading Data words are 14 bit wide but they are framed by a start and a stop bit so that there are 16 bit in total Transmission is done always with the least significant bit first LSB first All bits are latched provided ...

Page 20: ...d LOW level of the CLK signal 5 The LOWBATT input must either be connected to a programming voltage monitoring circuit or pulled up to the HIGH level The following circuit meets these requirements An additional feature is that it does not need an external power supply providing the programming voltage but it creates this via a DC DC converter from VDD 5V A 5V to 12V DC DC converter like the TMA051...

Page 21: ... RP0 change to bank 1 120 bcf TRISB 1 enable RB1 for output 130 bcf STATUS RP0 back to bank 0 140loop 150 bsf PORTB 1 RB1 1 LED on 160 call delay 170 bcf PORTB 1 RB1 0 LED off 180 call delay 190 goto loop 299 300delay 310 movlw 255 320 movwf DELAY1 330 movwf DELAY2 340dloop 350 decfsz DELAY1 f 360 goto dloop 370 decfsz DELAY2 f 380 goto dloop 390 return Enter this source code in TEXT mode and comp...

Page 22: ...ample program see specification of the PIC16F84A If the PIC has been programmed correctly the LED will start flashing as soon as a power source 5V is connected to the test circuit The push button switch is optional and brings the PIC into RESET state when pressed MCLR LOW Program execution is halted then so the LED is permanently off The flash frequency can be influenced via quarz frequency select...

Reviews: