| Electronics > Beginners |
| Assembly code Help! PIC16F57 |
| << < (27/32) > >> |
| KL27x:
Ok, still haven't looked at the code. So the machine counts how many coins you put in, but there's no display of this? Just a green light on the spin button as long as the count of coins is higher than zero? Is there something special that happens when there are 8 or more coins in there? The code checks for this in one part, and I find it to be curious. |
| Ian.M:
The articles said the max credit is £12.75 (255 x 5p), and the first eight 5p credits are displayed on the pattern LEDs when a pattern isn't running. I was slightly surprised that a NE556 controlled by a logic level was used for the servo pulse generation. Without searching through the code for that, I was expecting that to be interleaved with the display multiplexing code. A modern reimplementation on any PIC with a 16 bit Timer 1 and a CCP module wouldn't need the NE556 as it could generate a stable servo pulse with hardware edge timing directly. |
| Electrofinn:
it just lights up an led for each credit inserted, if more than 8 credits are put in they still get registered, you just can't tell how many are left unless you count in your head or the credit amount drops below 8, in which case the LEDs start to turn off one by one as each credit is played. yes the green light is only displayed when credit count higher than zero and is an indicator the machine is ready to play as it is the start button. the green light does turn off when you press it to spin the reels and comes back on again when machine is ready to be spun again. a picture of sticker I re-designed may also help. its not finished yet but at least you can see what the buttons are for. I will end up using better quality fruit pictures than I used in picture. |
| Electrofinn:
on julians youtube video he explains a little on this and in the comment section, he says "The PIC16C57 didn't have non-volatile storage (EEPROM). So there was nowhere to store the calibrated servo endpoints. By using the 555s, the endpoints are effectively stored on the two trimmer pots." i happen to like the simplicity of the trimmer pots as i am able to physically and easily calibrate where the servo travels to and stops. here is julians video if you are interested. |
| Ian.M:
--- Quote from: Electrofinn on October 08, 2018, 11:28:59 pm ---on julians youtube video he explains a little on this and in the comment section, he says "The PIC16C57 didn't have non-volatile storage (EEPROM). So there was nowhere to store the calibrated servo endpoints. By using the 555s, the endpoints are effectively stored on the two trimmer pots." i happen to like the simplicity of the trimmer pots as i am able to physically and easily calibrate where the servo travels to and stops. --- End quote --- Only the coin stack end position is critical. It doesn't matter how far the slide goes past the drop hole, so adjustment for a single position could have been entirely mechanical - put the horn on the servo splines turned to set the coarse position, and bend the linkage for fine adjustment. I suspect that the NE556 ended up in there because at that date, Julyan's coding skills on a baseline PIC didn't extend to writing interleaved isochronous code so he was unable to get a stable servo pulse. If the pulse is unstable, the servo would jitter, causing excessive battery consumption. |
| Navigation |
| Message Index |
| Next page |
| Previous page |