Search found 4 matches
- Tue Jul 17, 2012 3:20 pm
- Forum: Modules
- Topic: usart.bas Question about two lines of code
- Replies: 2
- Views: 2404
usart.bas Question about two lines of code
These two lines are in usart.bas, and used when there is a second EUSART, like in the 18F46K22. RCInput As TRISC.Booleans(7), // As TRISG (2) TXInput As TRISC.Booleans(6) // As TRISG (1) These instructions would report the condition of the RX/TX pins. But it seems, not correctly, at least for the 46...
- Tue Jul 17, 2012 3:13 pm
- Forum: Modules
- Topic: usart.bas Why these two lines?
- Replies: 0
- Views: 4417
usart.bas Why these two lines?
These three lines are in usart.bas RCStatus = $90 // serial Port Enable, continuous receive RCInput = True // receive pin Is Input TXInput = False // transmit pin Is Output For the 18F4620, only the first line seems necessary. When RCSTA.7, or SPEN, is set by the first instruction, the directions of...
ADCON1
Jerry, Thank you for the very informative answer. Looking at the 18F452, the code now makes sense, although even more sense with your suggested comment change. That quote was very useful. I just noticed that the 18F4620.bas device file says that this chip has 9 ADC channels: // system header ... #co...
ADCON1
ADC Library Module, Example Code snippet: ADCON1 = $07 // PORTE as digital (LCD) TRISA.0 = 1 // configure AN0 as an input ADCON1.7 = 1 // set analogue input on PORTa.0 The TRISA.0 = 1 statement makes sense. But the two ADCON1 statements do not. For the PIC 18F4620, the ADCON1 register is where port ...