Miniature terminal with either an RS232 or TTL interface