Problems with MCP3202 driver
John Abshier
Posts: 1,116
I tried to use Chip's MCP3202 driver with ViewPort and ViewPort would not start.· I found a problem with the MCP3202 driver.· The assembly code reads 5 longs for parameters but the Spin code only sets up 4 longs.· If I comment out this code, ViewPort works, but DAC functionality is lost.
John Abshier
{ call #param 'setup DAC configuration if_c or dira,t2 if_c movs ctra,t3 if_c movi ctra,#%00110_000 shr t3,#8 call #param2 if_c or dira,t2 if_c movs ctrb,t3 if_c movi ctrb,#%00110_000 }
John Abshier
Comments
I believe what's going on is that DIRA is set to a value that affects pins 30 and 31- which ViewPort requires for serial communication. This is the beauty of the Propeller- programs running in different cogs really shouldn't affect each other- apart from shared resources like global memory and the IO pins.
The most common problems users have with ViewPort are:
- not setting the timing constants correctly- this causes the conduit to send data at an incorrect baud rate
- using pins 30 and/or 31 in their own program- this prevents the conduit from sending/receiving data.
- not using the vp.share statement- so the conduit never runs
Best thing is to give the included tutorials a try and maybe even explore that book written by that spanish guy- manuel? Manual?
Hanno
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Download a free trial of ViewPort- the premier visual debugger for the Propeller
Includes full debugger, simulated instruments, fuzzy logic, and OpenCV for computer vision. Now a Parallax Product!
John Abshier
Hanno
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Download a free trial of ViewPort- the premier visual debugger for the Propeller
Includes full debugger, simulated instruments, fuzzy logic, and OpenCV for computer vision. Now a Parallax Product!