MB90330 Series
Smpl16
DESCRIPTION
Example Projects for MB90330 MCU
NOTE:
The header-file will cover all features of the Emulation chip MB90V330/S. No Flash- or Mask- version of the MB90330series
will support all features! Limitaions can be found in UARTs, USB, I2C, ADC, PADR etc. Please DO NOT USE resources / registers
others than specified for the dedicated Flash-/Mask-version. Please refer to the datasheet and hardwaremanual of the MB90330
series.
FEATURES
- Uart0_async:
It is a test application to send an welcome string via UART0 and echoes all received characters. Baud rate 19200 @ 24MHz, no parity, 1 stop bit and a data length of 8 bit. No interrupts are used. - Uart0_async_irq:
It is a test application to send an welcome string via UART0. All received characters are echoed by the interrupt routine. Baud rate 19200 @ 24MHz, no parity, 1 stop bit and a data length of 8 bit. RX-Interrupt for echoing char is used. - Uart1_async:
It is a test application to send an welcome string via UART1 and echoes all received characters. Baud rate 19200 @ 24MHz, no parity, 1 stop bit and a data length of 8 bit. No interrupts are used. - Uart2_async:
It is a test application to send an welcome string via UART2 and echoes all received characters. Baud rate 19200 @ 24MHz, no parity, 1 stop bit and a data length of 8 bit. No interrupts are used. - Uart3_async:
It is a test application to send an welcome string via UART3 and echoes all received characters. Baud rate 19200 @ 24MHz, no parity, 1 stop bit and a data length of 8 bit. No interrupts are used. - Watchdog:
After the power on or reset, the watchdog will be activated. Then at port0 is a "1" shift from 00 to 07 while clearing the watchdog timer. At the end there is an endless loop without clearing the watchdog timer to simulate a black hole. Then the watchdog will reset the MCU. If in the endless loop the watchdog reset is comment in, the MCU will be not reseted and the port P07 stay in "1" - Timebase-Timer:
In this example the Timebase Timer is used to generate an interrupt every overrun. Then port D01 will toggle. Every 10 overruns also the port P00 will toggle. - ReloadTimer:
This project uses interrupts of reload-timers 0-2 to toggle LEDs (Port0). - PWC-Timer:
It is a test application to mesure the frequency of an input signal on PWC-input pin and send the result to UART0. To start the measurement press "S". With this settings you could measure in a range from 25Hz til 65kHz. Baud rate 9600 @ 24MHz, no parity, 1 stop bit and a data length of 8 bit. - PPG8+8:
The channels 0/2/4 of the PPG-timer are used to deliver the count clock for channel 1/3/5. Pin PPG0: T=2*(41.6ns*(100+1))=8.4us 1/T=119kHz Pin PPG1: T=2*(41.6ns*(100+1)*(200+1))=1.69us 1/T=592Hz Pin PPG2: T=2*(167ns*(100+1))=33.66us 1/T=29.7kHz Pin PPG3: T=2*(167ns*(100+1)*(200+1))=6.78us 1/T=147Hz Pin PPG4: T=2*(667ns*(100+1))=134.73us 1/T=7.4kHz Pin PPG5: T=2*(667ns*(100+1)*(200+1))=27.1us 1/T=36.9Hz The frequencys could be monitored with an Oszilloscope at the Pins PPG0-PPG5 - PPG16Bit:
In this example the PPG-timer is set to the 16-bit mode. There are three different channels. The channels PPG0/1, PPG2/3 and PPG4/5 have each the same signaloutputs. The reloadregister are put together to load an 16bit value. Pin PPG0/1: Low/High ratio change continously For example connect an LED to this pin, the light will dimm up and down. Pin PPG2/3: T=(167ns*(257+1))+(167ns*(512+1))=129us 1/T=7.766kHz Here the Low/High ratio is different. Pin PPG4/5: T=2*(333ns*(65535+1))=43.6ms 1/T=22.9Hz Here the reload value is 0xFFFF. The signals could be monitored with an Oszilloscope at the Pins PPG0-PPG5 - Output-Compare:
This is an examlpe of the output compare function. On the ports OUT0-OUT3 there will be an rectangular signal what could be monitored with an oszilloscope. There are no interupts are used in this example. Make sure to use pullups (10K) on OUT0-OUT3! - IOport:
IOPort-project simply counts an internal variable and outputs the counter value to port0. No interrupts are used. - Input-Capture:
Simple frequency counter. This is an software example to test the four channels input compare of the 330er series. The input ports IN0 - IN3 are used. If the 16 bit free-run timer will overflow an interrupt will be generate, the port P00 will toggle and an overflowcounter increment. The 16 bit free-run timer will increment every 0.67us (main_clk/16) and overflow every 43.7ms, so on port P00 there is an rectangular signal of T=87.4ms (11.44Hz). Input capture is configured to detect rising edges of the input signals. Channel 0 have also toggle output functions. P02 will toggle if an rising edge of IN0 is detected, so an rectangular signal with the double frequency of the IN0 signal is generated. P04 will toggle, if no timer overrun is detected and the counter value are got. Be careful with alasing frequencys! Recommended input frequency range: 100Hz - 20kHz and as higher the input frequency the mesurements are more improper. The results will be print out on UART0 to see the values on a terminal. Baud rate 19200 @ 24MHz, no parity, 1 stop bit and a data length of 8 bit. - I2C_0:
The I2C-Interface0 of the MB90330-Series is used to write and read data from an external EEPROM 24C16. In the first part three bytes (65,66,76 = 'A','B','C') are written to memory address 0..2 Next step is to read out EEPROM starting at address 0. The Data are stored in an array result, that can be observed by the emulator. Finally you can communicate with UART0: Datatransferrate is 9600Baud@24MHz By pressing "w" up to 16 characters can be stored to the EPROM. With "carriage return" the input can be finished. By pressing "r" all 16 stored bytes will be read out. No interrupts are used. - I2C_1:
The I2C-Interface1 of the MB90330-Series is used to write and read data from an external EEPROM 24C16. In the first part three bytes (65,66,76 = 'A','B','C') are written to memory address 0..2 Next step is to read out EEPROM starting at address 0. The Data are stored in an array result, that can be observed by the emulator. Finally you can communicate with UART0: Datatransferrate is 9600Baud@24MHz By pressing "w" up to 16 characters can be stored to the EPROM. With "carriage return" the input can be finished. By pressing "r" all 16 stored bytes will be read out. No interrupts are used. - I2C_2:
The I2C-Interface2 of the MB90330-Series is used to write and read data from an external EEPROM 24C16. In the first part three bytes (65,66,76 = 'A','B','C') are written to memory address 0..2 Next step is to read out EEPROM starting at address 0. The Data are stored in an array result, that can be observed by the emulator. Finally you can communicate with UART0: Datatransferrate is 9600Baud@24MHz By pressing "w" up to 16 characters can be stored to the EPROM. With "carriage return" the input can be finished. By pressing "r" all 16 stored bytes will be read out. No interrupts are used. - ExtINT:
The project simply shifts a '1' up and down on port0, controlled by INT0 and INT1. Interrupts are used. - ADconv:
This sample uses an Analoge - Digital conversation. The AD converter catches a analoge value from signal on Pin 70 (AN0). The value from the AD converter is shown on Port 0 (LED´s). - AD-Uart:
The AD converter catches a digital value from signal on Pin 70 (AN0). The value from the AD converter is shown on Port 0 (LED´s). With the value a subroutine calculates the impressed voltage on Pin 37 (AN1) and sends it to the terminal. - Template:
This is a project template for the MB90330 Series. It includes some basic settings for e.g. Linker, C-Compiler which must be checked and modified in detail, corresponding to the user application. - History of the MB90330:
| Date | Revision | Description |
| 11.09.06 | V01R03 | Updated Example Package Released |
| 24.03.05 | V01R02 | Example Package released |
| 11.02.05 | - | Example Template header file update |
| 03.12.04 | V01R01 | Example Package released |
| 24.11.04 | 1.x | All examples modified because of new header files |
| 16.11.04 | V01R00 | Example Package released |
| 08.10.04 | 1 | Example Input-Capture created |
| 05.10.04 | 1.2 | Example ADconv new header file added |
| 05.10.04 | 1.2 | Example AD-Uart new header file added |
| 05.10.04 | 1.2 | Example ExtINT new header file added |
| 05.10.04 | 1.1 | Example I2C_2 new header file added |
| 05.10.04 | 1.1 | Example I2C_1 new header file added |
| 05.10.04 | 1.2 | Example Uart0_async new header file added |
| 05.10.04 | 1.2 | Example Uart0_async_irq new header file added |
| 05.10.04 | 1.1 | Example Uart1_async new header file added |
| 05.10.04 | 1.1 | Example Uart2_async new header file added |
| 05.10.04 | 1.1 | Example Uart3_async new header file added |
| 05.10.04 | 1.1 | Example Watchdog new header file added |
| 05.10.04 | 1.1 | Example Timebase-Timer new header file added |
| 05.10.04 | 1.1 | Example Timebase-Timer new header file added |
| 05.10.04 | 1.1 | Example ReloadTimer new header file added |
| 05.10.04 | 1.1 | Example PWC-Timer new header file added |
| 05.10.04 | 1.1 | Example PPG8+8 new header file added |
| 05.10.04 | 1.1 | Example PPG16Bit new header file added |
| 05.10.04 | 1.1 | Example Output-Compare new header file added |
| 05.10.04 | 1.1 | Example IOport new header file added |
| 05.10.04 | 1.1 | Example I2C_0 new header file added |
| 01.10.04 | 1 | Example Output-Compare created |
| 30.09.04 | 1 | Example Watchdog created |
| 29.09.04 | 1 | Example PPG16Bit created |
| 29.09.04 | 1 | Example Timebase-Timer created |
| 28.09.04 | 1.1 | Example ExtINT format adapted |
| 28.09.04 | 1.1 | Example AD-Uart format adapted |
| 28.09.04 | 1.1 | Example ADconv format adapted |
| 28.09.04 | 1 | Example PPG8+8 created |
| 27.09.04 | 1 | Example I2C_0 created |
| 27.09.04 | 1 | Example I2C_1 created |
| 27.09.04 | 1 | Example I2C_2 created |
| 22.09.04 | 1 | Example PWC-Timer created |
| 16.09.04 | 1 | Example Uart1_async created |
| 16.09.04 | 1 | Example Uart2_async created |
| 16.09.04 | 1 | Example Uart3_async created |
| 15.09.04 | 1 | Example ReloadTimer created |
| 15.09.04 | 1 | Example ADconv created |
| 15.09.04 | 1 | Example AD-Uart created |
| 10.09.04 | 1 | Example ExtINT created |
| 09.09.04 | 1.1 | Example Uart0_async correct buad rate |
| 09.09.04 | 1.1 | Example Uart0_async_irq correct baud rate |
| 09.09.04 | 1 | Example IOport created |
| 05.08.04 | - | Example Uart0_async_irq added |
| 05.08.04 | - | Example Uart0_async added |
| 05.08.04 | - | new Header-File, new Template project |
DOWNLOAD
Note: Netscape Navigator 4.xx does not allow direct execution of ".exe" files. Saving them to a temporary folder and executing them there is recommended.
EXESelf-extracting Sample Files for MB90330 Series V01R03 (1140 KB, 11. September 2006)
