|
#21
|
|||
|
|||
|
Re: SDCC for Vex is here!
Quote:
Quote:
Quote:
Last edited by mvcisback; 07-26-2011 at 04:23 PM. |
|
#22
|
||||
|
||||
|
Re: SDCC for Vex is here!
Quote:
To toggle Robot Enable/Disable or Autonomous/Driver control, the following sequence is used. 1. Change serial baud rate to 9600. 2. Set RTS 3. Wait 5mS 4. Clear RTS 5. Wait 15mS 6. Set RTS 7. Wait 10mS 8. Send serial char 0x35 to toggle enable/disable or Send 0x22 to toggle Autonomous/Driver control 9. Wait 20mS 10. Clear RTS 11. Wait perhaps 250mS, you can get some feedback on CTS I think but its just easier to have a delay. 12. change baud back to normal and continue communications. This communication does not go through the programming cable to the Joystick but is intercepted by a PIC inside the programming adapter. The PIC decodes the 0x35 (or 0x22) character and creates a pulse train on the RTS line going to the Joystick. 8 pulses, each of 3.3mS with a 50% duty cycle (that is 1.65mS low, 1.65mS high) are sent for the Enable/Disable command. 6 pulses with the same specs are sent for the Autonomous/Driver command. Pushing the button on the programming adapter sends 5 pulses. Here's a waveform showing RTS in (lower trace) to RTS out (upper trace) on the programming cable for the autonomous command. I've no idea why it has to be this complex but can only assume it's for some type of backwards compatibility with the older PIC 0.5. Hope this was not confidential but engineers are curious people, we always want to know how things work ![]() |
|
#23
|
|||
|
|||
|
Re: SDCC for Vex is here!
Thanks for the response. I'm confused as to whether this is specific to either vexnet or the crystals however this is something that I will try to investigate.
Also is there any prepossessing on the microcontollers behalf? I ask because the vexnet adapter for the old PIC controllers goes through a serial port ultimately and I suspect might be simpler when processed that way (though idk and the same function wouldn't work for both controllers then....) |
|
#24
|
||||
|
||||
|
Re: SDCC for Vex is here!
Quote:
|
|
#25
|
|||
|
|||
|
Re: SDCC for Vex is here!
Ah I see.
I more or less understand the direct programming cable implementation; however, my main concern is programming cable -> old big controller's outputs the same as programming cable -> joystick (vexnet). For example: Configuration 1: over the old rf controllers it'd go, PC -> Programming Cable -> Old remote -> PIC tx port -> Processed Configuration 2: over vexnet using adapter to PIC, PC -> Programming Cable -> Old remote(vexnet) -> vexnet adapter -> serial -> Processing Configuration 3: Cortex Controller, PC -> Programming Cable -> joystick -> cortex vexnet adapter -> Processing I'm mainly interested in the last two steps of each configuration |
|
#26
|
||||
|
||||
|
Re: SDCC for Vex is here!
hold on a sec. Can I download code to cortex from my mac? If so how do I do it cause i read the first post and it seemed kind of confusing and I read more posts and it just confused me more. Does this thing like compile and everything?
|
|
#27
|
|||
|
|||
|
Re: SDCC for Vex is here!
The port of open vex to cortex doesn't seem complete but there is a description of the tool chain using easy c produced hex files at http://personalpages.tds.net/~jwbacon/vex.html
|
|
#28
|
||||
|
||||
|
Re: SDCC for Vex is here!
Quote:
|
|
#29
|
|||
|
|||
|
Re: SDCC for Vex is here!
Yeah, specifically if you can find a way to generate the hex files you can use stm32flash....
|
|
#30
|
||||
|
||||
|
Re: SDCC for Vex is here!
So out of curiosity I did have a look at the STM32 loader which is part of this package. No problems compiling under OSX 10.5.8 (yes, the Mac I use most is still on Leopard although I have others on 10.6 and 10.7) but it did not connect with the Cortex. After a couple of hours debugging found that there was a problem with the very first serial write so I added a retry for the initial baudrate auto-negotiate command. You have to press the button on the programming cable to put the cortex into bootloader mode also. So I can see device info and download the flash. No plans to upload an image as there's no real upside and bricking the cortex is not an option I'm willing to chance.
The protocol for flash read/write is pretty simple and is documented well. If I were going to need this functionality I would probably rewrite with a GUI but I'm not sure there's really any point. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|