ByPic Tutorial May 25, 2015 11:56PM |
Registered: 8 years ago Posts: 8 |
Re: ByPic Tutorial May 26, 2015 02:29PM |
Admin Registered: 11 years ago Posts: 351 |
Re: ByPic Tutorial May 26, 2015 03:36PM |
Registered: 8 years ago Posts: 8 |
Re: ByPic Tutorial May 26, 2015 04:33PM |
Admin Registered: 11 years ago Posts: 351 |
Re: ByPic Tutorial May 26, 2015 07:46PM |
Registered: 8 years ago Posts: 8 |
Re: ByPic Tutorial May 26, 2015 10:07PM |
Registered: 8 years ago Posts: 8 |
Re: ByPic Tutorial May 27, 2015 08:43AM |
Admin Registered: 11 years ago Posts: 351 |
Re: ByPic Tutorial May 27, 2015 09:35AM |
Registered: 8 years ago Posts: 8 |
Re: ByPic Tutorial May 27, 2015 10:32AM |
Admin Registered: 11 years ago Posts: 351 |
Re: ByPic Tutorial May 27, 2015 11:27AM |
Registered: 8 years ago Posts: 8 |
Re: ByPic Tutorial May 27, 2015 11:46AM |
Admin Registered: 11 years ago Posts: 351 |
// 0,1,2,3,4,5,6,7,8,9,dp" //constant DIGIT$ {0x3f,0x30,0x5b,0x4f,0x66,0x6d,0x7c,7,0x7f,0x67,0x80} constant DIGIT {0x3f,0x30,0x5b,0x4f,0x66,0x6d,0x7c,7,0x7f,0x67,0x80} and // ***************************************************************************** // Uses a table to set the segments to represent a number // ***************************************************************************** function seg_number(n) dim d // d = tbl_get$(?DIGIT$, n) // get digit from table d = DIGIT(n) // get digit from table io_setPortL(PORTB, ALLSEG) // turn off io_setPortH(PORTB, d) endf
Re: ByPic Tutorial May 27, 2015 12:14PM |
Registered: 8 years ago Posts: 8 |
Re: ByPic Tutorial May 27, 2015 01:44PM |
Registered: 8 years ago Posts: 8 |
Re: ByPic Tutorial May 27, 2015 02:48PM |
Admin Registered: 11 years ago Posts: 351 |
// ***************************************************************************** // ***************************************************************************** function timer() dim n=1 tmr_set(*TIMER23(), 1000000) print "\nThis will print a number every second" tmr_clr(*TIMER23()) // clear flag while comkey?(2) = 0 if tmr_flag(*TIMER23()) <> 0 then print "\nNumber is now",n n = n + 1 tmr_clr(*TIMER23()) // clear flag endif wend endfThe change is that a timer is referred to know with *TIMER12() instead of ?TIMER23, thanks for letting me know so I can update the website