Hello! New 2.0.8 test build is ready!
You can get it from http://z-uno.z-wave.me/files/z-uno/test ... index.json repo (note the test-ucxx in the middle!)
As usually a lot of small fixes and big improvements!
(all links are not active yet, we are filling the docs)
1. Error that lead to Z-Uno being unreachable after new sketch load (reset was required).
2. Problems with ADC wrong errors and input resistance (pullup was accidentelly turned on).
3. Problems with data loss on UART1/UART0 on speed bigger than 9.6 kbps. UART reworked to use buffering and MCU facilities (DMA).
4. Problems with pins 17-23 being changed on Z-Wave packet send.
5. Failed I2C communication with Arduino and other MCUs.
1. IR input buffer size rised from 200 to 300 bytes - now IR commands up to 9 bytes can be captured (used by most A/C remotes).
2. Allowed to use delay() in setup(). This call is blocking
1. ADC resolution can be changed using function analogReadResolution(byte resolution). Resolution can be in range 1-16 bits. Most popular:
- 10 bits (default) - Arduino Uno compatibility mode
- 12 bits - maximum possible in Z-Uno
- 8 bits - can save energy in battery devices (uses special mode of Z-Wave MCU to make ADC faster)
2. Possibility to choose Reference for ADC using analogReference(byte ref). Possible values are (bitmask flags):
- ADC_HIGH_EXTERNAL - use A0 pin as upper reference voltage
- ADC_HIGH_INTERNAL - use internal voltage reference 1.2 V as upper reference voltage (NB! there might be a ±10% drift from Z-Uno to Z-Uno, but constant for a particular Z-Uno!)
- ADC_HIGH_VCC - use Vcc as upper reference voltage (default)
- ADC_LOW_EXTERNAL - use A1 pin as lower reference voltage
- ADC_LOW_GND - use GND as lower reference voltage (default)
- Pre-defined (Arduino-like) values: DEFAULT = (ADC_HIGH_VCC | ADC_LOW_GND), INTERNAL = (ADC_HIGH_INTERNAL | ADC_LOW_GND), EXTERNAL = (ADC_HIGH_EXTERNAL | ADC_LOW_GND)
3. Possibility to define PWM resolution using function analogWriteResolution(byte res). Resolution can be in range 1-16 bits. Most popular:
- 8 - like in Arduino Uno (default)
- 16 - maximal possible
4. External interrupts of the Z-Wave chip: INT0 (pin 17), INT1 (pin 18), ZEROX (pin 3). Interrupt handler should be defined in global range via ZUNO_SETUP_ISR_*(isr_handler), where isr_handler is the name of the corresponding function to call on interrupt.
NB! The code in isr_handler should be as fast as possible and should not contain ANY function calls except few specified below.
Trigger mode is defined using function zunoExtIntMode(byte int_num, byte mode). Allowed values are for int_num are ZUNO_EXT_INT0, ZUNO_EXT_INT1, ZUNO_EXT_ZEROX, for mode are CHANGE (value cahnge), FALLING (high to low falling), RISING (low to high rising).
5. General Purpose Timer (GPT) is now available. interrupt handler can be set via ZUNO_SETUP_ISR_GPTIMER(gpt_handler), where gpt_handler - is the handler function name (like for interrupts handlers). Timer is configured using the following functions:
zunoGPTInit(byte flags) - set timer mode:
- ZUNO_GPT_SCALE1024 - specify tick frequency as 32MHZ/1024, otherwise default 4MHZ is used.
- ZUNO_GPT_IMWRITE - write new value immediately instead of waiting for timer to reach zero
- ZUNO_GPT_CYCLIC - reload the timer on reaching zero - otherwise timer triggers only once
zunoGPTEnable(byte bEnable) - enable/disable timer
zunoGPTSet(word interval) - defines the number of ticks before interrupt happens.
NB! GPT can not be used together with PWM. Don't use analogWrite() while using timers
6. New 1 ms timer. Unlike GPT, this timer is not so accurate, but have no restrictions on PWM. Defined using ZUNO_SETUP_ISR_1MSTIMER(m1ms_handler);
7. New library for temperature & humidity AM2030 I2C sensor (more accurate than DHT22)
Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
2 posts • Page 1 of 1