Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $regfile = "m8Adef.dat"
- $crystal = 8000000
- 'the internal oscillator of 8 Mhz was choosen in the fusebits
- Dim Volume As Byte
- Dim Muteflag As Bit
- Config Portd = Output
- Config Portc = Output
- Config Portb = Input
- Config Scl = Portc.0 'Is serial clock SCL
- Config Sda = Portc.1 'Is serial data SDA
- I2cinit
- Const Lm48100l = &B11111000 'Adress left amplifier
- Const Lm48100r = &B11111010 'Adress right amplifier
- Main:
- Volume = 2
- Muteflag = 0
- I2cstart
- I2cwbyte Lm48100l
- I2cwbyte &B00010100
- I2cwbyte &B01111111
- I2cstop
- Waitms 25
- I2cstart
- I2cwbyte Lm48100r
- I2cwbyte &B00010100
- I2cwbyte &B01111111
- I2cstop
- Waitms 25
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement