Yes. It is working in the Fast Mode.
valuedac= 4095
I2CWRITE sda,scl,%11000010,[valuedac.highbyte,valuedac.lowbyte]
The above control byte in binary is from data sheet 1100 = device...
Type: Posts; User: acjacques; Keyword(s):
Yes. It is working in the Fast Mode.
valuedac= 4095
I2CWRITE sda,scl,%11000010,[valuedac.highbyte,valuedac.lowbyte]
The above control byte in binary is from data sheet 1100 = device...
Richard from Support Melabs give me the solution:
addr var byte
addr = $C0 ;$60 <<1
'==========================================
writedac4725:
I2CWRITE sda,scl,addr,[4000] '12 bit...
I am trying to control the DAC MCP4725 but my code seems not work . My code:
sda var portb.4
scl var portb.5
cont var byte
cont = %1100
addr var byte
addr = $60
Solved:
I use:
TXSTA = $24 ' enable HSEROUT just before use it
HSEROUT...... here
TXSTA= $0 ' disable HSEROUT after the use. This will allow Debug and Serout2 be used in the pin
Solved
When trying to send serial message to same pin using HSEROUT and DEBUG and SEROUT2.
I have noted that HSEROUT overides any other messages .
If HSEROUT is uncommented only it work. If HSEROUT is...
I have followed the the suggestion and i wrote this code that is now working in the magnetic compass.
heading is my compass variable (001 ~359)
crc is the nmea checksum
crccalc:
crc=...
About the protection of PIC input pin lets go remember that generally input pins already have positive and negative clamp diodes built in the chip. I have tested even without a series resistor but...
I have not yet written any configuration. I will intend to do this in the programmer.
the code is simple as:
define osc 20
main:
high portb.0
pause 1000
low portb.0
pause 1000
goto main
the code is simple as:
define osc 20
main:
high portb.0
pause 1000
low portb.0
pause 1000
goto main
I'm trying to compile a simple program to pic16f1937 but I am having errors in the MPASM assembler. I have no idea what could be wrong.
pbb2.60a
micro code studio
mpasm 5.20
error messages...
http://bray.velenje.cx/avr/terminal/
download Terminal V1.9b
A good idea in order to have a direct PIC and a PC bilateral communication using the PIC's UART and HSERIN and HSEROUT without an external inverter like MAX232 is choose a PIC with Comparator...