Cortical representations of rhythmic and discrete movements are analyzed and used to create a novel neural decoding algorithm for brain-machine interfaces. This algorithm is then implemented to decode both cyclic movements and reach-and-hold movements in awake behaving rhesus macaques using their cortical activity alone. Finally, a healthy macaque wears and controls a lower body exoskeleton using the developed BMIas a proof of concept of a brain-controlled neuroprosthetic device for locomotion.