Changes

Programming:CPC Booster

18 bytes removed, 02:39, 24 July 2016
/* Memory map of the CPC Booster+ */ typo
== HOW TO USE THE How to use the CPC BOOSTERBooster+ ==
The CPC booster+ is very easy to use, even through BASIC. In this document I will explain how to use all the functions of the card by analyzing the memory map. I will use both Assembly and Basic, but in most cases you will have to use only assembly to use the speedy characteristics (you can’t have 230400 baud serial communication in Basic!). The only thing you need is simple IN and OUT commands to give orders to the board. All the addresses are 16bit, but the high byte is always &FF for the CPC booster.
;19 IN/OUT 00-$3F ROM ADDRESS HIGH
;1A IN/OUT 00-$FF ROM ADRESS ADDRESS LOW
;1B IN 00-$FF READ ROM DATA (ADDRESSING MODE)
</pre>
'''=== ADDRESS:&FF08 OUT TX – AUTO POLLING'''===
If you want to transmit a character in a full duplex or a half duplex communication then you just send the character to the address &FF08 and the flags are automatically checked by the program of the microcontroller!
<pre>
BASIC:        A A=X    X               OUT &FF08,A
</pre>
<pre>
ASSEMBLY:     LD LD BC,&FF08              LD LD A,X              OUT OUT(C),A
</pre>
To select the type of communication you want to have (full duplex, half duplex or 485 halfduplex), you can use UART REG3.
 
=== ADDRESS:&FF09       IN        RX – WAIT UDR CHARACTER ===
== 512 BYTES Bytes EEPROM ==
Since the microcontroller had the EEPROM, I thought that I should give the ability for the CPC to access it. I know it’s not much but incase you want to save some settings, it's quite good. Anyway, the addresses are from 0 till 511 (0-&1FF in HEX). Address 0 shouldn’t be used because it’s reserved for the bios protection routine.
== THE ANALOG TO DIGITAL CONVERTER The Analog to Digital Converter ==
The CPC booster gives you the ability to make 8bit samples on the CPC. Ofcourse, there were some samplers in the past for the CPC, like the Music Machine, but this time it’s easier than ever! The sampler can be used only through assembly because in Basic the sampling rate is worse than an 1 bit sample!
== PROGRAM MEMORY READProgram memory read/WRITE write ==
The AVR mega16 has 16KB of program memory. The CPC booster gives you the ability to read and write this memory, that’s why the update of the peripheral is possible. Right now, less than 5 KB of this memory is used for the bios of the CPC booster, so you have around 10KB for your own purposes. Ofcourse, you already know that you should be careful to which address you will store your data, because you may accidentally erase data. If this happens, then you should try to re-update the bios and if that fails, then you will have to send the microcontroller back to me to re-program it.
== TTL INPUTinput/OUTPUT output ==
This is a 5 bit port which can be used as input/output for TTL signals. I think that it’s one of the most important characteristics of the CPC Booster because it gives you the ability to have a parallel port even if you only have 5 bits to control. People who like electronics and especially digital circuits already know how important this is.
</pre>
== 256 BYTES Bytes RAM BUFFER Buffer ==
=== ADDRESS:&FF28 IN/OUT READ/WRITE RAM ADDRESS ===
With BIOS VERSION 1.5, you have the ability to use 256 bytes RAM of the AVRMEGA16 as a buffer to store temporary data. It’s not eeprom, if the CPC booster+ resets, then the data are gone. With &FF28 you select the address, with &FF29 you read/write data to the buffer and with &FF2A, after reading/writing data, the address increases automatically by one.
 
[[Category:Programming]]
897
edits