\ gforth version of gertboard_sw_20130106.zip dtoa.c \ using channel 0 \ \ These are the connections for the digital to analogue test: \ jumper connecting GP11 to SCLK \ jumper connecting GP10 to MOSI \ jumper connecting GP9 to MISO \ jumper connecting GP7 to CSnB \ \ Multimeter connections (set your meter to read V DC): \ connect black probe to GND \ connect red probe to DA0 on J29 require ggb-01.fs : dtoa \ Map the I/O sections ggb_setup_io \ print GPIO base address ggb_gpio . \ activate SPI bus pins 7 ggb_INP_GPIO 7 0 ggb_SET_GPIO_ALT 9 ggb_INP_GPIO 9 0 ggb_SET_GPIO_ALT 10 ggb_INP_GPIO 10 0 ggb_SET_GPIO_ALT 11 ggb_INP_GPIO 11 0 ggb_SET_GPIO_ALT \ Setup SPI bus ggb_setup_spi \ set some voltage levels... 0 0 ggb_write_dac ." meter should read about 0V" cr 50 ggb_long_wait 0 0x400 ggb_write_dac ." meter should read about 0.5V" cr 50 ggb_long_wait 0 0x7F0 ggb_write_dac ." meter should read about 1.02V" cr 50 ggb_long_wait 0 0xAA0 ggb_write_dac ." meter should read about 1.36V" cr 50 ggb_long_wait 0 0xFF0 ggb_write_dac ." meter should read about 2.04V" cr ggb_restore_io ;