- Name:
-
uniout
- Syntax:
-
UNIOUT pin, device, command
UNIOUT pin, device, command, (data)
UNIOUT pin, device, command, address, address, (data, data...)
Pin - is a variable/constant which specifies the i/o pin to use.
Device - is the UNI/O type, %10100000 for EEPROM devices
Command - is the write type command, either
UNI_WRITE |
write |
UNI_WREN |
write enable |
UNI_WRDI |
write disable |
UNI_WRSR |
write status |
UNI_ERAL |
erase all |
UNI_SETAL |
set all |
Address - is the 2 byte address required by UNI_WRITE.
Data - is the information to write.
- Description:
-
Write data to the UNI/O device.
Note that the UNI/O parts have a 16 byte page boundary. A single write cannot go over a page boundary (ie a multiple of 16). This means, for instance, you may write 10 bytes in one UNI_WRITE command from address 0 up, but not 10 bytes from address 10 upwards, as this would overlap a page boundary (byte 16).
The 'uniout' command allows data to be written to an external UNI/O part such as the 11LCxxx series EEPROM chips. UNI/O parts only require one i/o pin to connect to the PICAXE microcontroller. A 4k7 pullup resistor is not technically required by the UNI/O specification, but is highly recommended.
Note that when first powered up (after a power-on or brown out reset) the UNI/O device is in a special low-power standby mode. It is necessary to 'wake' the device, via a rising edge pulse (using the pulsout command), before the uniin / uniout commands will function correctly.
This command cannot be used on the following pins due to silicon restrictions: