New Posts  All Forums:

Posts by wakibaki

OK, here are the 2 subroutines, clockwize and anticlockwize, they're practically identical, so there's no reason not to just describe one.   clockwize: rrf rflag,f btfss STATUS,C goto clk bsf rflag,7 clk: bcf STATUS,C return aclockwize: rlf rflag,f btfss STATUS,C goto aclk bsf rflag,0 aclk: bcf STATUS,C return   We have the state...
Now let's take a look at the program's main loop.   This is the section between the label, 'mainloop:' and the last 'goto mainloop'.     mainloop: btfsc PORTB,4 goto main_anti call clockwize call do_your_thing call delay goto mainloop main_anti: btfsc PORTB,5 goto mainloop call aclockwize call do_your_thing call delay goto ...
Here's the schematic for the little board I built.     It means I can connect up a 9V battery and have a power (5V) output for the stepper board. Then there are 4 pins brought out to a header to drive the stepper motor coils, and a programming header so that I can reprogram the chip in situ.   There are 2 switches to ground with pull-ups to Vcc connected to PORTB, bits 4 and 5. The pullups keep the pins high, except when the switches are closed, when...
Here's the program reduced to a template for PIC 16F690:     list p=16F690 #include __CONFIG _FCMEN_OFF & _IESO_OFF & _BOR_OFF & _CPD_OFF & _CP_OFF & _MCLRE_OFF & _PWRTE_OFF & _WDT_OFF & _INTRC_OSC_NOCLKOUT cblock h'20' endc ORG 0x000 mainloop: goto mainloop END   These few lines are what we call the programming overhead. The bits that need to be in the program, but that aren't really part of the program...
Lest anybody get impatient to see some code, here's the first, basic program in its entirety:-     list p=16F690 #include __CONFIG _FCMEN_OFF & _IESO_OFF & _BOR_OFF & _CPD_OFF & _CP_OFF & _MCLRE_OFF & _PWRTE_OFF & _WDT_OFF & _INTRC_OSC_NOCLKOUT cblock h'20' rflag sflag dflag endc ORG 0x000 bcf STATUS,RP1 bcf STATUS,RP0 ; 00, BANK 0 movlw b'11111111' movwf PORTA ; PORTA...
Back again.   I said I would show a couple of applications using 7-segment displays, and I will, but in the meantime I needed to develop something for myself, so I'm going to show it first.   A friend of mine recently suggested using a stepper motor to drive a pot or stepped attenuator for a remote, powered volume control.   As it happened I had just learned a new technique for PCB layout.   Some components are circular, such as tubes. Previously, when...
Android stick. Hadn't seen those. Cool.   I already got my wife's Nexus 7 playing audio off the NAS, so it should be a snap with an android stick.   w
  If I only had a dollar for every time I heard this.       Thanks, but I notice yours doesn't work...     The issue I ran unto is pops and clicks using my USB DAC. As I have stated numerous times. I've got no desire to spend another 10 or 20 hours ferreting through a bunch of ill-documented rigmarole to end up with pops and clicks.   When yours works, come back and tell me how you did it.   w   It's not a Fiio, it's a Behringer, which uses one of the...
@ofs   That's pretty much where I ended up.   For anyone else...     What I need is a straightforward set of instructions with no missing details on how to go from a RPi + blank SD card + generic USB DAC to a system where you can load a (16/44k1) .wav file onto the SD card and play it back over the USB with no pops, clicks, audio hash or interruptions whatsoever.   Headless is not required, I'll treat that as a separate issue and get to it when I've got...
  That's a good thought, something common to both channels. It could be something as simple as a failed solder joint though, due to thermal stress.   The starting point with any fault finding exercise is to use your eyes. Just inspect the assembly for anything that looks wrong. Burnt, loose...    w
New Posts  All Forums: