MAX186 to BSII
Archiver
Posts: 46,084
Hi Oussama,
The control byte and the code look okay. Recheck your wiring, to be
sure that there is no mix-up on things like Din and Dout and that the
power supplies and grounds are connected and bypassed with a
capacitor. RB1 is a word variable, right? There has been a lot of
discussion of this chip on this list in the archive. Also check out
this URL for tutorial and code...
http://www.geocities.com/SiliconValley/Orchard/6633/max186.html
-- Tracy
>Hello Tracy,
>This is Oussama, the guy who's asking about the interface between
>BSII & MAX186. Thank you for your reply, I really appreciate it.
>I tried your code, the only thing I added to it is the declaration
>of Control byte,
>
> ' from figure 9 in MAX186 data sheet
> ' internal clock mode timing
>
> Control = %10001110 ' 1 = start ; 000 = CH0 ; 1 = unipolar ; 1
>= single-ended
> ' 10 = internal clock mode
> LOW chipselect
> shiftout Dout, CLK, MSBFIRST [noparse][[/noparse]Control\8]
> HIGH chipselect ' conversion in progress, 10 microseconds max
> LOW Dout ' to be sure no spurious control byte
> LOW chipselect
> shiftin Din, CLK, MSBPOST [noparse][[/noparse]RB1\12]
> HIGH chipselect ' finished
>
>My test was like this:
> Input Output
> 1 v 0.3 v
> 2 v 1.3 v
> 3 v 2.3 v
>The output varies and it is not accurate.
>
>Any help or suggestings will be greatly appreciated.
>
>Thanks
The control byte and the code look okay. Recheck your wiring, to be
sure that there is no mix-up on things like Din and Dout and that the
power supplies and grounds are connected and bypassed with a
capacitor. RB1 is a word variable, right? There has been a lot of
discussion of this chip on this list in the archive. Also check out
this URL for tutorial and code...
http://www.geocities.com/SiliconValley/Orchard/6633/max186.html
-- Tracy
>Hello Tracy,
>This is Oussama, the guy who's asking about the interface between
>BSII & MAX186. Thank you for your reply, I really appreciate it.
>I tried your code, the only thing I added to it is the declaration
>of Control byte,
>
> ' from figure 9 in MAX186 data sheet
> ' internal clock mode timing
>
> Control = %10001110 ' 1 = start ; 000 = CH0 ; 1 = unipolar ; 1
>= single-ended
> ' 10 = internal clock mode
> LOW chipselect
> shiftout Dout, CLK, MSBFIRST [noparse][[/noparse]Control\8]
> HIGH chipselect ' conversion in progress, 10 microseconds max
> LOW Dout ' to be sure no spurious control byte
> LOW chipselect
> shiftin Din, CLK, MSBPOST [noparse][[/noparse]RB1\12]
> HIGH chipselect ' finished
>
>My test was like this:
> Input Output
> 1 v 0.3 v
> 2 v 1.3 v
> 3 v 2.3 v
>The output varies and it is not accurate.
>
>Any help or suggestings will be greatly appreciated.
>
>Thanks