fdfishman@watcgl.UUCP (Flynn D. Fishman) (06/25/86)
Well in quest of a 1 millisecond stopwatch before going to hardware, we have decided to give the 8520(-B) chip a chance I am getting no where with it. I can not seem to get the timer to do anything. What I am doing is. I am setting up variables like so SHORT *timer_low_A (= 0xbfd400) SHORT *control_register_A (= 0xbfde000 *control_register_A = 0x71 print *timer_low_A (note that the numbers in brackets are assigned at another point in the program) The problem arises in that timer_low_A does not change at all. I have also tried playing around with PRA, and DDRA (Is that a typo in the hardware manual, I am assuming that DDRA = 0xbfd200 and DDRB = 0xbfd300) but regardless of what I do timer_low_A does not change. I would like to be able to eventually have timer B count down, and cause A to decrement on B's underflow, but if I can not even get A (or B for that matter) moving I am stuck. If any one can help me with this problem or present a better way to get a 1 millesecond grain timer I would really appreciate it. I do not want use hardware, because then it would be harder to run the experiment simultaneously and publish our algorithms. (A recap of the problem for those who forgot or are new) I need to be able to calculate the time from when a stimulus is displayed on the screen to the point in time when the user presses a mouse button. (I am using Manx C on a 512k Dual Drive System) Thanks you very much -- FDFISHMAN (Flynn D. Fishman) UUCP : ...!{decvax|ihnp4|clyde|allegra|utzoo}!watmath!watcgl!fdfishman ARPA : fdfishman%watcgl%waterloo.csnet@csnet-relay.arpa CSNET : fdfishman%watcgl@waterloo.csnet
grr@cbmvax.cbm.UUCP (George Robbins) (06/27/86)
In article <792@watcgl.UUCP> fdfishman@watcgl.UUCP (Flynn D. Fishman) writes: >Well in quest of a 1 millisecond stopwatch before going to hardware, we have >decided to give the 8520(-B) chip a chance > >I am getting no where with it. I can not seem to get the timer to do anything. You did notice that one 8520 is on the high order data lines, and the other is on the low order lines? I guess this is so you can munch both at once with word accesses, but it's kind of confusing... -- George Robbins - now working with, uucp: {ihnp4|seismo|caip}!cbmvax!grr but no way officially representing arpa: cbmvax!grr@seismo.css.GOV Commodore, Engineering Department fone: 215-431-9255 (only by moonlite)
robinson@shadow.Berkeley.EDU (Michael Robinson) (07/03/86)
[I ain't afraid of no bugs] >If any one can help me with this problem or present a better way to get a >1 millesecond grain timer I would really appreciate it. Has anyone ever tried using the sound chips for a clock? The way I read the hardware reference, you should be able to set up a short (one byte) waveform, set the sample time, and get an interupt. The interupt handler would increment the timer value, reset the sound DMA, and return. Then, <sample time> later, you would get another interupt and the process would repeat. Am I way off base?