fl 0 wconstant _nokia_res 1 wconstant _nokia_scl 2 wconstant _nokia_data 3 wconstant _nokia_cs wvariable value 1 _nokia_res lshift wconstant _nokia_resm 1 _nokia_scl lshift wconstant _nokia_sclm 1 _nokia_data lshift wconstant _nokia_datam 1 _nokia_cs lshift wconstant _nokia_csm : _nokia_res_out _nokia_res pinout ; : _nokia_scl_out _nokia_scl pinout ; : _nokia_data_out _nokia_data pinout ; : _nokia_cs_out _nokia_cs pinout ; : _nokia_res_l _nokia_resm _maskoutlo ; : _nokia_res_h _nokia_resm _maskouthi ; : _nokia_scl_l _nokia_sclm _maskoutlo ; : _nokia_scl_h _nokia_sclm _maskouthi ; : _nokia_data_l _nokia_datam _maskoutlo ; : _nokia_data_h _nokia_datam _maskouthi ; : _nokia_cs_l _nokia_csm _maskoutlo ; : _nokia_cs_h _nokia_csm _maskouthi ; : shift_out dup 1 - 1 swap lshift swap 0 do dup value W@ and if _nokia_data_h else _nokia_data_l then 1 rshift _nokia_scl_l _nokia_scl_h loop drop ; : shift_in ; : cs_out _nokia_cs_h _nokia_cs_l ; : nokia3300_init _nokia_res_out _nokia_scl_out _nokia_data_out _nokia_cs_out _nokia_res_l _nokia_scl_h _nokia_data_h _nokia_cs_h 1f4 delms _nokia_res_h 1f4 delms _nokia_cs_l \ CS = Low ca value W! \ DISCTL 9 shift_out cs_out 100 value W! 9 shift_out cs_out 120 value W! 9 shift_out cs_out 100 value W! 9 shift_out cs_out 101 value W! 9 shift_out cs_out bb value W! \ COMSCN 9 shift_out cs_out 101 value W! 9 shift_out cs_out d1 value W! \ OSCON 9 shift_out cs_out 94 value W! \ SLPOUT 9 shift_out cs_out 81 value W! \ VOLCTL 9 shift_out cs_out 121 value W! 9 shift_out cs_out 103 value W! 9 shift_out cs_out 20 value W! \ PWRCTL 9 shift_out cs_out 10f value W! 9 shift_out cs_out a7 value W! \ DISINV 9 shift_out cs_out bc value W! \ DATCTL 9 shift_out cs_out 101 value W! 9 shift_out cs_out 101 value W! 9 shift_out cs_out 104 value W! 9 shift_out cs_out 75 value W! \ PASET 9 shift_out cs_out 100 value W! 9 shift_out cs_out 183 value W! 9 shift_out cs_out 15 value W! \ CASET 9 shift_out cs_out 100 value W! 9 shift_out cs_out 183 value W! 9 shift_out cs_out 5c value W! \ RAMWR 9 shift_out cs_out 4308 0 do 10f value W! 9 shift_out cs_out 1ff value W! 9 shift_out cs_out \ 0 . loop 1f4 delms af value W! \ DISON 9 shift_out cs_out _nokia_cs_h \ CS = High ; : sample _nokia_cs_l \ CS = Low \ ------------------------------- 75 value W! \ PASET 9 shift_out cs_out 100 value W! 9 shift_out cs_out 12a value W! 9 shift_out cs_out 15 value W! \ CASET 9 shift_out cs_out 100 value W! 9 shift_out cs_out 183 value W! 9 shift_out cs_out 5c value W! \ RAMWR 9 shift_out cs_out 162c 0 do 10f value W! 9 shift_out cs_out 100 value W! 9 shift_out cs_out \ 1 . loop \ ------------------------------- 75 value W! \ PASET 9 shift_out cs_out 12b value W! 9 shift_out cs_out 155 value W! 9 shift_out cs_out 15 value W! \ CASET 9 shift_out cs_out 100 value W! 9 shift_out cs_out 183 value W! 9 shift_out cs_out 5c value W! \ RAMWR 9 shift_out cs_out 162c 0 do 100 value W! 9 shift_out cs_out 1f0 value W! 9 shift_out cs_out \ 2 . loop \ ----------------------------------- 75 value W! \ PASET 9 shift_out cs_out 156 value W! 9 shift_out cs_out 180 value W! 9 shift_out cs_out 15 value W! \ CASET 9 shift_out cs_out 100 value W! 9 shift_out cs_out 183 value W! 9 shift_out cs_out 5c value W! \ RAMWR 9 shift_out cs_out 162c 0 do 100 value W! 9 shift_out cs_out 10f value W! 9 shift_out cs_out \ 3 . loop _nokia_cs_h \ CS = High ;