Prévia do material em texto
<p>Sistemas Microprocessados</p><p>134</p><p>135 TICK ; Tick counter</p><p>136</p><p>137 ; LED Display on PICkit 1 Flash Starter Kit</p><p>138</p><p>139 LEDREG ; LED Array Register</p><p>140 LEDSTATE ; LED Array State Counter</p><p>141 LEDDISP ; LED Array Display bit (which LED is lit)</p><p>142</p><p>143 ; TC72 Thermal Sensor variables</p><p>144</p><p>145 BIT_CNTR ; Bit counter</p><p>146</p><p>147 TC72_ADX ; TC72 Address</p><p>148 TC72_MSB ; TC72 MSB Temperature</p><p>149 TC72_LSB ; TC72 LSB Temperature</p><p>150 TC72_CTRL ; TC72 Control Register</p><p>151</p><p>152 TEMP_MSB ; Temporary Register Most Significant Byte</p><p>153 TEMP_LSB ; Temporary Register Least Significant Byte</p><p>154</p><p>155 ; Binary Coded Decimal (BCD) variables</p><p>156</p><p>157 BCD_H ; BCD Hundreds</p><p>158 BCD_T ; BCD Tens</p><p>159 BCD_O ; BCD Ones</p><p>160</p><p>161 endc</p><p>162</p><p>163</p><p>164 ;----------------------------------------------------------------------</p><p>165 ; Defines</p><p>166 ;----------------------------------------------------------------------</p><p>167</p><p>168 ;--------------------</p><p>169 ; PORTA (Section 3.1)</p><p>170 ;--------------------</p><p>171 ; PORTA is an 6-bit wide, bi-directional port. The corresponding data</p><p>172 ; direction register is TRISA. Setting a TRISA bit (= 1) will make</p><p>173 ; the corresponding PORTA pin and input. Clearing a TRISA bit (= 0)</p><p>174 ; will make the corresponding PORTA pin an output. The exception is</p><p>175 ; RA3, which is input only and its TRIS bit will always read as a ’1’.</p><p>176 ;</p><p>177 ; Function of PORTA pins depend on:</p><p>178 ; Configuration Bits (CONFIG) (Section 9.1)</p><p>179 ; Weak Pull-up Register (WPU) (Section 3.2.1)</p><p>180 ; Interrupt-on-change Register (IOCB) (Section 3.2.2)</p><p>181 ; Option Register (OPTION_REG) (Register 4-1)</p><p>182 ; TIMER1 Control Register (T1CON) (Register 5-1)</p><p>183 ; Comparator Control Register (CMCON) (Section 6.0)</p><p>184 ; A/D Control Register (ADCON0) (Section 7.0) (PIC16F676 Only)</p><p>185</p><p>186 #define POT PORTA, 0 ; (Analog Input) Potentiometer RP1</p><p>187 #define RA1 PORTA, 1 ; (Digital Input/Output) LEDs D6, D7</p><p>188 #define RA2 PORTA, 2 ; (Digital Input/Output) LEDs D2, D3, D4, D5, D6, D7</p><p>189 #define SW1 PORTA, 3 ; (Digital Input Only) Push Button SW1</p><p>190 #define RA4 PORTA, 4 ; (Digital Input/Output) LEDs D0, D1, D2, D3</p><p>191 #define RA5 PORTA, 5 ; (Digital Input/Output) LEDs D0, D1, D4, D5</p><p>192</p><p>193 ; Define for TRISA Register (Section 3.1)</p><p>194</p><p>195 ; PORTA Pins = xx543210</p><p>196 #define PORTATRIS b’00111111’</p><p>197</p><p>198 ;--------------------</p><p>199 ; PORTC (Section 3.3)</p><p>200 ; --------------------</p><p>8 Julho de 2022</p>