Home » Getting Started » MENSCH™ – Getting Started

MENSCH™ – Getting Started

Welcome to the Getting Started Guide for your MENSCH™.  These simple steps will guide you through connecting your board to your computer and running your first program. Please see the MENSCH™ product page for datasheets, schematics, and other technical information.

Step 1: Plug in your MENSCH™ via the male pin header J5

The MENSCH™ can be powered by either 3.3V or 5V DC. Depending on your desired application you can select either of these voltages to work with your MENSCH™. This is accomplished through the use of a  USB/RS232 cable or board.  WDC has tested FTDI serial cables and Sparkfun serial boards.(at 5V, 3.3V does not seem to work consistently).

USB_RS232 Cable or Board and Micro USB  cables/adapters NOT included

Below is a wiring guide using the FTDI cable as an example. This can be used for matching the signals from other adapters to your board.

If you do not have the FTDI drivers installed on your machine, you can download them here:

Step 2: Get Started with WDCTools and Terminal Interface

  1. Download WDCTools Install WDCTools and set update preferences with the installer

  2. WDC Programming Manual – This is a fantastic programming reference for 65xx microprocessors.

The WDCTools is NOT for resale or reverse engineering of our technology in any form and is NOT provided for the development of commercial products that use non–WDC 65xx processors in Core or Chip form without a license.

The MENSCH™ has the MENSCH™ monitor configured so that on reset it will communicate to a terminal using a UART. You can use programs such as HyperTerm (PC), HyperSerialPort (PC), PuTTY (MAC, Linux, PC), ZTERM (MAC), XTERM (MAC, Linux) to communicate with the boards. Or if its a more mobile interface you seek, with any Android device you can use the FTDI UART Terminal! WDCTools includes EasySXB, a simple terminal program for working with the MENSCH™,

Step 3: Browse to your WDCTools example project

Here is a direct link to download the example source–> QBX8LEDS

You can download this program example as PDF here.

All of the executables for WDCTools can be found in the C:\wdc\Tools\bin directory.  One of the many useful tools that you can find there is a Serial Terminal application created by Joe Davisson.  He has allowed us to include EasySXB with our installs of WDCTools.  You will find the 64-bit Windows version in the “bin” directory.  Joe has the latest source on Github and the latest downloads at SourceForge.

Finding EasySXB in the bin directory.

We will get started with the MENSCH™ using a simple program to work with the 8 LEDs that are on the board.

The project file is located at C:\wdc\W65C265QBX\QBX8LEDS\ASM.  This project has a batch file that will assemble and link the project.  It will also launch EasySXB.

Double-click on the mk265_QBX8LEDS.bat file to execute the batch file.

Files contained in the code example.

Once the batch file runs, a windows Command window appears.  It will stay on the screen until you close it.  It should be the same as below if everything ran correctly.

Command Prompt output after BATch file is run.

Back in your Windows Explorer window, you will see several new files were created.  These include the .OBJ (Object) file that is used by the linker to make the .BIN (WDC Binary Format output), .HEX (Intel HEX Format Output), and .S28 (Motorola S-Record 28 Format output) files.  EasySXB uses the .HEX file to load into the memory of the MENSCH™.  A listing file (.LST) file is also created.  You can view that file in any text editor and see both your code and the corresponding assembled addresses, opcodes, etc.

File explorer after BATch file completes successfully.

The last window that opened is EasySXB.  This is the Serial Terminal program that we usually use with the W65C134SXB and W65C265SXB.  Since the MENSCH™ can talk through its serial port and that connection is configured the same on the MENSCH™ as it is on the W65C265SXB, we can use EasySXB with the MENSCH™.  EasySXB has three Menu Options (File, Options, and Help).  Below the Menu bar the application has 4 Import sections.  The first is the Registers section (located in the upper left corner).  The values of each register are displayed here after the “GET” button is pushed.  A terminal connection must be established before you can “GET” the register values.

Just the register section is the “JUMP” section. You must input an address that your program is located in for the project.  For the MENSCH™ you must include the Bank Address followed by a colon, and then the address in HEX format. Ie. 00:0200 will be for address $0200 in bank $00.

The next section is the status register.  Each part of the status register is indicated here.  A green light means that the corresponding register flag is set HIGH (“1”).  No light indicated the flag is not set (“0”). These values are also indicated by the “SR” value in the Register section.

To the right of all the previous sections is the Terminal Window.  This is where all communication between the MENSCH™ and EasySXB will be displayed.

EasySXB on startup.

Before we can communicate, we must make sure we have the proper settings in EasySXB.  For the MENSCH™, make sure that in the Option-Board Model menu, “W65C265SXB” is selected.

The MENSCH™ and W65C265SXB use the same setting.

We are ready to connect our FTDI cable into both the USB port on our PC and the other end into the J5 connector of the MENSCH™.  The black wire of the FTDI cable is PIN1.  There is a PIN1 indicator on the MENSCH™ (it is the furthest left pin).  Be careful to plug in the MENSCH™ correctly.

Now, “Connect to SXB” from the File Menu.

A prompt will appear asking for you a port to connect to.  This is the COM port that the FTDI cable was assigned by Windows.  You can find this by opening your Windows Device Manager.  You will be looking for the “Ports (COM & LPT)” section like below. Type the number found after “COM” in the EasySXB prompt and press Connect.

There is now text in the Terminal Window section of EasySXB.

Now that EasySXB is connected to the MENSCH™, we can now communicate from the MENSCH™ to EasySXB.  Press the “SW1” pushbutton switch on the MENSCH™.  This is the reset button.

One of the things that the MENSCH™ will do on reset, is transmit a welcome message on Serial Port 3 of the W65C265S chip.  This welcome message can be seen below.  Along with the welcome message, the MENSCH™ will send the current values for all of the registers and detailed Status Register flags. You can press the “GET” button in the Register section to see the register values appear there.

On reset, these values will be the same as what was sent with the welcome message.

Now we can upload a simple program.  Click on “File”, then “Upload Program”. The Upload Program dialog box opens.  Choose the HEX file that was created by the BAT file, then click the Open button.

The terminal will display that the program is uploaded correctly.

Type the starting location of your code.  For the QBX8LEDs, it is at $00:00CO (do not type the $, the “:” is optional ).  Now click on the JML (JuMp Long) or JSL (Jump to Subroutine Long).  Both will work for this example.

You will notice that the EasySXB terminal display will update as follows:

The lights on the MENSCH Microcomputer have changed as well.  This example sets P7x to $AA.  Therefore starting with the farthest left LED (P77) lit, every other LED (P77, P75, P73, P71) will be lit.

You can change the Assembly code to experiment with the LEDs.  Just run the batch file again to assemble and link your changes.  Enjoy!