Xino and Xino Basic.
It is a rare occasion when a new company comes onto the market, with new ideas, at affordable prices, but recently a company called Ciseco came to my attention. You can find their website at www.ciseco.co.uk . Crownhill produced their AMICUS version of the Arduino board, but unfortunately based it on the 18F25K20 chip which is a 3.3v device and therefore somewhat limiting for amateurs. Crownhill had decided that their old free version of Proton Lite, was getting a bit long in the tooth and introduced a brand new Proton marketing tool, in the form of the Amicus compiler. Whereas Proton Lite had a 50 line limitation, the new Amicus had no limitations except that it only worked with the 3.3v 18F25K20 PIC. Unfortunately a 3.3v device turned out to be somewhat unpopular because it introduced problems in interfacing a 3,3 volt device to many of the 5v devices that were available to amateurs. The 5v version of the PIC is now available, but Crownhill show no signs of modifying the Amicus compiler to work with this PIC. The introduction of the 18F25K22 PIC effectively made the 18F25K20 PIC redundant, because whereas the 'K20 only accepted supply voltages between 1.8V and 3.6v, the 'K22 covered the complete range of 1.8v to 5.5 volts. I think that if Crownhill want to really make Amicus an effective marketing tool for the Proton compiler, then they need to base it on a PIC that is acceptable to amateurs, ie the 18F25K22.
Next Ciseco started selling an Arduino style board called Xino, using an RS232 download solution and the same PIC, the 18F25K20, without the Amicus bootloader, which would not work with the RS232 solution. That left the alternative of ICSP or another bootloader to to program the PIC in situ. Some clever people on the digital-diy.com website (Highly recommended), using the DS30 bootloader, came up with a patch solution and it works !. In fact it will allow downloads in two different ways. The first is via the Amicus controls and second using a 'stand alone' DS30 control panel. The Amicus route uses the DS30 GUI 'console' and the stand alone version the DS30 GUI program.
I found the Xino design interesting, because it offers a platform that complies with the Arduino pinout ( as far as any Arduino clone board does ) and is flexible enough to work with any compiler. I personally do not like the Arduino concept, but that is really a matter of choice. The designers of the Xino board have avoided the 'more of the same' approach to Arduino style board, got rid of the somewhat limiting FTD chip, which means that the Amicus bootloader cannot work with the board, but other bootloaders such as the DS30 can. The PIC can also be programmed in-situ using a Pickit2 or Pickit3 programmer (ICSP),
Unfortunately the Xino board uses the 18F25K20 PIC, which is a 1.8v - 3.6v device, which has been effectively been made redundant by the introduction of the 18F25K22 PIC which covers the complete range of 1.8v to 5.5v, which is much more useful. I am not alone in thinking this, as Picaxe have also dropped the 18F25K20 PIC, in favour of the more useful 18F25K22 PIC. Since the 18F25K20 IC on the Xino board is a surface mounted, it will be a challenge for most amateurs, to try and update the board by removing the existing PIC and replacing it with the 18F25K22.
Xino basic board.
This is the simplest entry level Xino board. I think of it as more an application board than a development board, but it would serve either purpose. Whereas a Xino board comes populated, the Xino basic board comes as a kit of parts and a whole load of options. For example, it can take the more advanced Picaxe chips, or standard PIC's such as the 18F25K20 or 18F25K22, running at 64 MHz and with 32K of memory !.
Before assembling the kit, it may pay to think about how and what you intend to use your board for !. If for example you want to eventually fit full size Arduino shields to this board, then all components must to be below the height of the header sockets. The three components that can cause problems are ...
The voltage selection jumper. When the board is assembled, the shorting link can touch the bottom of a shield. Now if you decide that you will only ever use the 5 volt Picaxe chips, or only ever use the 3.3volt 18f25K20 chip then the three pin header and jumper can be replaced by a simple wire link, solving the problem. If you (like me) have already soldered the three pin header into the board ..... fear not !. It is possible to slide the plastic body upwards and off the pins. You can then cut 2.4 mm off each pin which will reduce the height below the board headers. If you want to pretend that you always intended to do this .... I will not tell anyone !.
The serial port for the 28 pin chip. The serial port for the 28 pin socket is next to pin 17. If you soldered a straight four pin header in this position, you would not be able to plug the boot loader cable into it without removing any shield that is fitted to the board. The solution is to fit a four pin right angled header and that will allow the bootloader cable to be plugged in from the bottom of the board with the shield still in place. Only three of these pins are actually used, so the fourth pin could be used to make this connection polarised, by plugging a plastic 'key' into the unused socket hole. You will note that by using the right angled header you are covering up one mounting hole. If anyone questions you about this, you have my full permission to look smug and point out that the offending pin (second from left) is not used and will be cut off to effect polarisation of the connection.
The power connector. The spacing of the three power connecting pads on the board is 0.2", or the same as miniature terminal blocks. These terminal blocks come in two different heights ... both of which are too high and will therefore prevent a full sized shield being plugged into the basic board. So if you want to use full size shields, do not solder in a terminal block !. Also I would like to see the power connector polarised, to prevent it being plugged in the wrong way around and blowing the PIC. The simple way to do this is to drill an extra hole between two of the three pads (or two extra holes, which would allow a 5 way right angled header plug to be fitted in this position, with a plastic 'key' in one of the unused cable socket holes, would polarise this connector and allow full sized shields to be used ... with the power cable connected. Please note that the pin next to the left hand ground pin has been removed to effect polarisation. Ciseco have chosen to use a female socket in this position, which unfortunately completely covers up the mounting hole.
The Xtal and xtal capacitor pads.
As supplied, the board is intended to use the PIC internal oscillator block, but pads have been provided for an external 16MHz xtal and two 15pF Xtal capacitors. When they are fitted, they look like this ....
I would imagine that Ciseco will eventually sell the 16 Mhz xtal and two 15 pF caps as an optional add on. Likewise the right angled headers mentioned above. Why would you want them ?. Well the internal 16 Mhz oscillator block inside the PIC is only calibrated to 1%. If one PIC is working to another PIC, then the total error will be up to 2% and also temperature dependant. Since an Xtal and the two loading capacitors only cost pence, it will ward off the possibility of all kinds of horribly obscure problems, by buying them, for critical applications.
28th December 2010.
I did manage to get a blank chip from Canada, just to prove that they exist. The next step would be to program the bootloader into it .... but that means you have to spend between £15 - £45 to buy a programmer. I already have a Pickit2 programmer, which I regard as being the best value for money, at any price. What I didn't have was an adaptor to take 28 pin PIC's. What I did do was order some 28 pin ZIF sockets from China, with the intention of making one that matched my other adaptors, which plug straight into the Pickit2.
Today I decided I could wait no longer and made up a 'temporary' one on Veroboard.
On the top left of the board is a six way right angled plug that plugs directly into the Pickit2. As you can see it is very simple and only six of the PIC pins are connected. After uploading the latest data file which includes the 18F25K20, Pickit2 recognised the chip and programmed it. The automatic verify function proved that it had programmed the 18F25K20 16 MHz xtal and x4 PPL bootloader OK. If you need to find the bootloader file you can find it on the digital-diy.com web site plus files for other configurations.
OK, so now I have an 18F25K20 chip with the bootloader programmed into it and am ready to go .... nowhere !. You see I still have to get things like the download cable, the download cable driver and the compiler to all work together. Also how will I know when they are working ?.
30th December 1010.
1. When I start fault finding, everything is suspect; the PIC, the download cable, the cable driver, the board and the set up of the compiler. My first move is to prove the PIC and the board are working. I can do this by using the Pickit2 to program a simple flashing LED program into the PIC. The most likely pin failure when experimenting with download cables will be RC6 and RC7.
'Note. This program is for the Amicus compiler.Xtal = 16
HighPORTC DelayMS 1000 Low PORTC DelayMS 1000
In my case, I removed the PIC from the Xino basic board and plugged it into the Pickit2, 28 way adaptor seen above. Then set the programmer in Amicus to Pickit2 (or whatever you have) and then program the above program into the 18F25K20. You then place the PIC back onto the basic board, connect an LED with a series 270 ohm limiting resistor to PortC.6 pin and ground. Power up the board and the LED should flash at 1 Hz. If that works ok transfer the led and 270 ohm resistor to Port C.7 and again it will flash at I Hz if that pin is OK.
Please note that programming the above program into the PIC using a programmer, will over-write the bootloader, if it existed. So when you have everything working, go back and reprogram the chip with the DS30 bootloader. Also remember to set the programmer back to DS30 before using the bootloader.
2. The next thing to do is to get a download cable working. A Picaxe download cable will not work with the Xino basic board, because the Picaxe cables invert both the TX and RX serial signals. We need a cable that does not invert the signals. If you are using the 18F25K20 PIC you also need a cable that has 3.3volt TX and RX signals as the more common 5 volt cables can damage the 3.3v PIC. One commonly found suggestion is to make one from a mobile phone download cable such as the Nokia CA-42. Unfortunately if you check the output voltages of this cable, using an oscilloscope, they will be found to be about 4.6 volts !.
Testing a download cable.
Just to recap we are using a USB to TTL download cable, which has a TX (Transmit) output and an RX (Receive) input. It is possible to functionally test this sort of download cable using the LOOP BACK test. It should of course be set up, using a known serviceable USB to serial download cable, connected to the PC's USB socket, so you know what to expect. This will be the socket used, when the cable was first installed on the PC.
First load the Hyper terminal program. Go to Start ... All Programs ... Accessories ... Communications ... Hyper Terminal and the following panel will be seen.
Next enter a name for this connection. As you can see I have simply called mine "Test". Ignore the Icons. Then click on 'OK' and another panel will appear.
We are not going to use a telephone line so ignore the first three entries. Click on 'Connect using' and a small drop down panel will appear showing you what COM ports are available. I do know that when I first installed the test cable, it appeared on COM5, so I next clicked on COM5 and "COM5" will appear in the 'Connect using' box. Click on 'OK'. Another panel will appear.
We do not need to change anything on this panel, so click on 'OK' and a data terminal window will appear.
From the terminal end anything we now type into the PC keyboard will be transmitted down the USB cable to its serial end, however nothing will appear on the screen because it only shows what is received. If at the remote serial end of the cable we short the TX and RX connections together, anything that is transmitted will be received back by the terminal and will appear on the screen, as seen below.
If this happens, it proves that the cable is working. All you have to do, is work out which wire is TX and which is RX, when you connect the cable to the board. This procedure can be used to test any USB to serial adaptor / download cable.
3. Download cable drivers. Many of the drivers available on the internet for the CA-42 and other Prolific chip set cables, simply do not work !. One that has been reported to work is the USB010 USB-Serial Adapter cable driver, from Picaxe. This can be downloaded free from .....
Please note that there are different versions for different operating systems.
4. The bootloader I am using is the DS30. If you are using the Amicus compiler, the DS30 needs to be set up as your default 'programmer'. At the end of this article are three procedures for using the DS30 bootloader and setting it up in Amicus. The programmer type is selectable in the 'View' menu of Amicus. Don't forget if you want to program the bootloader into a PIC then you will have to switch back to your usual programmer, in my case the PICKIT2 programmer.
5. At some point you will have attended to the above points and are now ready to try out your download cable. Plug it into the lower serial input, on the board. To re-cap you have already programmed a simple flasher program into the PIC and that worked !. What I suggest that you do next is modify the program in Amicus to make the LED flash much slower. Don't forget to next select the DS30 as the programmer in Amicus. If everything is working, when you select 'compile and program' in Amicus, it should download the modified program down the download cable and into the PIC. The PIC will immediately run the new modified program and if everything is working you should see the change in flash rate of the LED. If it does not change then you know that the download did not work and that you need to systematically check out your system, until it does !.
Downloading programs from the Amicus compiler to boards, other than Amicus.
(Screen shots of Amicus are by kind permission of Crownhill Associates).
I have cobbled together three procedures that may help newcomers get started with downloading programs using the DS30 bootloader, which is available free, to download at http://sourceforge.net/projects/ds30loader/ .
the DS bootloader to download from the DS30 Loader GUI.
The DS30 bootloader has two different ‘front ends’. The GUI version is intended be a ‘stand alone’ application. The Console version is intended to be integrated with a compiler, in this case the Amicus compiler.
the GUI front end.
Download the DS 30 bootloader files from …
Run this zip package and it will
unzip the files …
Double click on the DS LOADER
GUI file icon.
This will screen the DS30 Loader panel.
You will note that it has retained the details of the last download, this saves you having to re-enter device, Baud rate and port every time you use it. Also in the top Hex-file box it will retain the location of previous files downloaded. The programs that these files represent were originally written in the Amicus BASIC language, which we humans can understand but the PIC microprocessor cannot. Before the program can be downloaded to the PIC it has to be compiled, that is converted into a Hex file, before it can be downloaded to the PIC.
It is a good habit to open a folder especially for your Hex files so that you will be able to find them easily. Amicus keeps track of the BASIC programs that you write, but not the Hex files. On this computer I have started a new folder for the Hex files called “My Xino”, so that I will always be able to find them.
The Xino PIC ds30 board uses the 18F25K20 PIC. So that is what we must select in the two device boxes.
The default Baud rate for the bootloader must be the same as set in the Amicus compiler. The default Baud rate is 115,200 and you can leave it set at that rate.
The Coms port setting, is dependant on what Coms port was assigned to your USB download cable, the first time you plugged it in. If you plug it into any other USB socket, the computer may not be able to find it. To find out which port has been assigned to it go to the control panel and look at the DEVICES list. One of the entries will be for your USB cable. If you unplug it one of the entries will disappear, plug it back in and it will reappear along with the Com port number. Go back to the DS30 loader panel and select that Com port. On this computer it was Com5, but on yours it may be different.
the Hex file to the PIC on the Xino board.
1. First select the Hex file that you want to download to the PIC, in the Hex file box.
2. Connect the USB cable by plugging one end into the assigned USB socket and the 3.5mm plug into the download socket on the Xino board.
3. Apply power to the Xino board and observe the red power indicator LED lights. Any program in the PIC will automatically run, but you can ignore it.
4. On the DS30 GUI panel. click on the tick box for ‘Write program’.
5. Click on the DOWNLOAD button on the tool bar and the Hex file will be copied to the PIC on the Xino board.
Note !. During the download, a black panel will be seen on the screen.
When you see the bottom line of text appear, momentarily press the RESET button on the Xino board and this will allow the bootloader to be found. If you then examine the lower window on the DS30 loader panel, it will give you the details of the successful download. The new program will automatically run on the Xino board. It really is as easy as that!
the DS30 to download Hex files from the Amicus Compiler.
Open the AMICUS compiler. The first thing we have to do is install the DS30 as a NEW PROGRAMMER in the Amicus compiler.
Type in ‘ds30LoaderConsole.exe’. Then click on Next and another panel will appear.
The simplest way is to click on Find Automatically and let Amicus search. When it finds it this panel appears.
Click on Next and the last panel appears.
Into the parameters box you must type the following …
--file=$hex-filename$ --device=PIC$target-device$ --port=COM5 --baudrate=115200 --write-program --non-interactive
Then click on the Finished button.
NOTE. My download cable was found to be assigned to Com5. If yours is different then change the Com5 to whatever yours is using. You will also Note that the statement also sets the Baud rate to 115200 exactly the same as the DS30 boot loader was set to. Both must be the same !.
NOTE, if you want to make sure that the DS30 bootloader has now been included on the programmer list you can go back and check the Programmers Options box.
Yes it is and it is selected as the default programmer, until you decide to change it. You are now ready to go into the Amicus compiler, write a program, compile it and then download the compiled Hex into a PIC microprocessor!
When using the GUI version, settings and control buttons used are those on the GUI panel. When downloading Hex files from within Amicus, the control buttons used are those on the Amicus GUI.
Amicus gives us two options for compiling the BASIC program into a Hex file.
button will cause the compiler to compile the program and nothing else.
The compile and download button will cause the compiler to compile the program and download it to the target PIC via the down load cable.
During the compile Amicus checks for programming mistakes and will not allow the download to happen. When you have corrected all of the mistakes it will allow a download. It must be remembered that Everytime we make corrections we have actually changed the program and it needs to be re-compiled again. When all mistakes have been corrected, clicking on the Compile and Program button will re-compile and then start the download. The following panel will appear on top of the Amicus GUI …
When the bottom three
lines of text appear you must click on the Xino board RESET
switch, which will enable the boot loader to be found. If you do not press the RESET
while the search is in progress, it will time out and the download will not
After a successful download the Xino board will automatically run the downloaded program.
Program button on the Amicus GUI.
Clicking on this button will not instigate a compile, but it will download the Hex file of the last compiled program. This can be useful when you are testing download cables, board connections and also when you have more than one PIC that you wish to program.
Copyright John Kent 16th November 2010.