'main.spin 'Version: 1.0 'Parker Dillmann 'The Longhorn Engineer (c) 2013 'www.longhornengineer.com 'See end of file for License. CON _CLKMODE = XTAL1 + PLL16X _XINFREQ = 5_000_000 _1ms = 1_000_000 / 1_000 OBJ DISPLAY : "flip_display_driver" PST : "Parallax Serial Terminal" VAR PUB main | temp_str PST.Start(9600) pause1ms(100) DISPLAY.flip_display_init pause1ms(100) DISPLAY.flip_reset pause1ms(100) pst.Str(STRING("This is a serial interface demo for the IEE Flip 03701-13-016/S VFD")) pst.NewLine pst.Str(STRING("Type up to 16 characters.")) pst.NewLine repeat PST.StrInMax(temp_str, 16) DISPLAY.flip_clear DISPLAY.flip_display_str(temp_str) return PRI pause1ms(period) | clkcycles clkcycles := ((clkfreq / _1ms * period) - 4296) #> 381 ' Calculate 1 ms time unit waitcnt(clkcycles + cnt) return DAT {{ ┌──────────────────────────────────────────────────────────────────────────────────────┐ │ TERMS OF USE: MIT License │ ├──────────────────────────────────────────────────────────────────────────────────────┤ │Permission is hereby granted, free of charge, to any person obtaining a copy of this │ │software and associated documentation files (the "Software"), to deal in the Software │ │without restriction, including without limitation the rights to use, copy, modify, │ │merge, publish, distribute, sublicense, and/or sell copies of the Software, and to │ │permit persons to whom the Software is furnished to do so, subject to the following │ │conditions: │ │ │ │The above copyright notice and this permission notice shall be included in all copies │ │or substantial portions of the Software. │ │ │ │THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, │ │INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A │ │PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT │ │HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION │ │OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE │ │SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. │ └──────────────────────────────────────────────────────────────────────────────────────┘ }}