290 likes | 475 Views
Oppenheimer Technologies. Rick King Jonathan Creekmore. Problem. Current programming solutions for the Ubicom SX microcontroller are expensive. Typical costs range from $150-$240. Our Solution. NADS – Not Another Development System
E N D
Oppenheimer Technologies Rick King Jonathan Creekmore
Problem • Current programming solutions for the Ubicom SX microcontroller are expensive. • Typical costs range from $150-$240.
Our Solution • NADS – Not Another Development System • A low-cost programmer that can be built by students for less than $50 in components and open software.
Hardware Design RS-232 Ubicom SX-18 Flash Programming Voltage In-System Programming Interface PC Target System
RS-232 RS-232 Interface Ubicom SX-18 PC
RS-232The Concept • Most Commonly Available Serial Communications Protocol for Computer. • Transceiver Necessary to Translate Between RS-232 Voltage Levels and CMOS Levels.
RS-232 Schematic U4 14 17 Vdd RA0 5 18 Vss RA1 Receive 1 RA2 Transmit 2 RA3 6 RB0 OSC1 7 16 RB1 OSC1 8 15 OSC2 RB2 OSC2 9 RB3 10 3 RB4 RTCC MCLR 11 4 RB5 MCLR 12 RB6 13 RB7
Where’s the UART? • A UART Converts Between Asynchronous Serial Data and Parallel Data • This Function is Performed by the SX-18 using Ubicom’s Virtual Peripherals.
Flash ProgrammingVoltage Ubicom SX-18 Flash Programming Voltage Target System
Flash Programming Voltage • The Ubicom SX Family of Processors Require 12 V to Program the Flash Memory. • Design is Limited to a Single 5 V Power Supply. • 12 V Must Be Generated on Demand for Programming.
U4 Vdd 14 17 Vdd RA0 Vss 5 18 Vss RA1 Receive 1 RA2 Transmit 2 RA3 Vpp_On 6 RB0 MCLR_Ext OSC1 7 16 RB1 OSC1 OSC2_Ext 8 15 OSC2 RB2 OSC2 9 RB3 10 3 RB4 RTCC MCLR 11 4 RB5 MCLR 12 RB6 13 RB7 Flash Programming Voltage Schematic J1 1 2 662-Out 3 4 5 6 ISP Header
In-System Programming Interface Ubicom SX-18 In-System Programming Interface Target System
Frames and Cycles • 17 Frames Per Word • 5 Cycles Per Frame • Initiated by Application of 12V Programming Voltage
In-System Programming Schematic U4 14 17 Vdd RA0 5 18 Vss RA1 1 RA2 2 RA3 6 RB0 7 16 RB1 OSC1 OSC2_Ext 8 15 RB2 OSC2 9 RB3 10 3 RB4 RTCC 11 4 RB5 MCLR 12 RB6 13 RB7
Hardware Costs • Current Parts Cost $30.00 • Possible Cost Reductions • Reduce PCB Cost from $10 to $0.70 • Potential Cost (1000 quantity) $15.00
Demo Plan • Create sample program that has output noticeable to the audience. • Modify program based on audience interaction. • Program test microcontroller and demonstrate with the new code.
6FCE 4FCE 0110111111001110 0100111111001110 ??? Wait Serial Communications Programmer 0100111111001110
E3 4FCE 0100111111001110 11100011 Checksum Actual Data DLL Communications Programmer 4FCEE3 010011111100111011100011
Checksum Algorithm Checksum (payload, length, cksum) Begin cksum := 0 for i := 1:length cksum := payload[i] + cksum end cksum := ~cksum + 1 End
Checksum Demo payload := 4FCE length := 2 Iteration 0: cksum = 0 cksum := 4F + cksum Iteration 1: cksum = 4F cksum := CE + cksum Iteration 2: cksum = 1D cksum := ~cksum + 1 cksum = E3
ISP Protocol -- Program Yes Start Session Program Image Done? No No Get Device Word Program FuseX Done? Yes Yes No Erase Done? Image Done? No Yes
4FCE 14 CF 0100111111001110 00010100 11001111 Command Repeat Checksum Speed Increase • Common commands must be repeated multiple times to be effective • Serial communications channel cannot provide adequate bandwidth for a full image • Solution:
ISP Protocol -- Program Start Session No Image Done? Program Image Get Device Word Yes Erase Program FuseX