#fuses NODEBUG, USBDIV, PLL5, CPUDIV1, VREGEN, CCP2B3 #fuses HSPLL, NOMCLR, PUT, BROWNOUT, BORV43, NOWDT, NOPROTECT, NOLVP Pin C6 (25) is directly assigned to pin TTL-Rx in Maestro.Ĭrystal oscillator: 10MHz with 22pF capacitors. I took them making 2 jumpers (orange wires) on servo bus. The same +5V applied to PIC18F4550 is applied to Maestro. Putc(0x70) // Target position = 1500 us (typical neutral for servos)Īs you can see the attached images, I’m using Micro Maestro. Send another Set Target command using the Pololu protocol. Putc(0x20) // Target position = 1000 us (typical minimum for servos) Send a Set Target command using the Pololu protocol. When a power the circuit, microMaestro takes 2 seconds to blink continuously red LED, so I guess something is wrong. I made only this modification on C code: #use delay(clock=10000000) I connected a 10MHz oscillator crystal with two 22pF capacitors. Vin is powered in +5V (the same power source of PIC18F) and both PIC18F and microMaestro are grounded properly. I really need some kind of intensive help, for this.Īs mentioned in manual, I connected pin 25/Tx/RC6 of PIC18F4550 into Rx MicroMaestro. ![]() I checked the communication and all connections, but I can’t find what is going wrong. I’ve tried to compile the PIC C code example in manual, but simply nothing happens. I think the schematics seems like as mentioned in manual. The servo 1 moves again, for column two, and then servo 2 moves 25 times to fill the second row… And so on.Ĭould you help me to write a C code for PIC18F4550, for this application? ![]() ![]() So, while the first one move one step, 4 degrees (25 movements x 4 degrees = 100 degrees of range), which represents the first column, the second servo moves 25 times to fill the first row (4 degrees too). The servos are combined (arranged) to move in rows and columns. I need to control two servos, to make a 25x25 matrix movement. Could you please explain me what the C code for PIC18F4550 in manual really do for one servo? What I am a little confused is about the Hex codification sent through putc command.
0 Comments
Leave a Reply. |