13.11.2012 Views

Mis primeros programas en assembler - Micros Designs

Mis primeros programas en assembler - Micros Designs

Mis primeros programas en assembler - Micros Designs

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

133. return<br />

134. ;.........................................<br />

135. ;**** Lee Estado del LCD ****<br />

136. LCD_Bandera<br />

137. bcf LCD_RW<br />

138. bcf LCD_RS<br />

139. bcf LCD_E<br />

140. bcf LCD_D4<br />

141. bcf LCD_D5<br />

142. bcf LCD_D6<br />

143. bcf LCD_D7_BF<br />

144. nop<br />

145. bsf LCD_RW ; Modo Lectura.-<br />

146. bsf STATUS,RP0 ; Banco 1.-<br />

147. bsf LCD_D7_BF ; Configura TRIS para recibir estado del<br />

LCD.-<br />

148. bcf STATUS,RP0 ; Banco 1.-<br />

149. bsf LCD_E<br />

150. nop<br />

151. btfsc LCD_D7_BF ; Lee estado del LCD, 1-> Ocupado.-<br />

152. goto $-1 ; Esperamos a que se desocupe.-<br />

153. bcf LCD_E ; LCD_D7/BF->0, seguimos adelante.-<br />

154. bsf STATUS,RP0 ; Banco 1.-<br />

155. bcf LCD_D7_BF ; Reconfigura TRIS para <strong>en</strong>vio de Data.-<br />

156. bcf STATUS,RP0 ; Banco 1.-<br />

157. return<br />

158. ;.............................<br />

159. ;**** Envia pulso Enable ****<br />

160. LCD_Enable<br />

161. bsf LCD_E<br />

162. nop<br />

163. nop<br />

164. bcf LCD_E<br />

165. return<br />

166. ;.............................<br />

167. ;**** Envia Dato al LCD ****<br />

168. ;*** Previam<strong>en</strong>te configurado como Comando o como Caracter.-<br />

169. LCD_Envio_Data<br />

170. movwf LCD_Dato ; Guardamos Dato a <strong>en</strong>viar.-<br />

171. ; CARGAMOS NIBLE ALTO EN PUERTO.-<br />

172. bcf LCD_D4 ; Cargamos un cero.-<br />

173. btfsc LCD_Dato,4 ; Si es 1, modificamos a uno, sino<br />

seguimos.-<br />

174. bsf LCD_D4<br />

175. bcf LCD_D5 ;<br />

176. btfsc LCD_Dato,5<br />

177. bsf LCD_D5<br />

178. bcf LCD_D6 ;<br />

179. btfsc LCD_Dato,6<br />

180. bsf LCD_D6<br />

181. bcf LCD_D7_BF ;<br />

182. btfsc LCD_Dato,7<br />

183. bsf LCD_D7_BF<br />

184. call LCD_Enable ; Habilitamos LCD para recepcion de Data.-<br />

185. ; CARGAMOS NIBLE BAJO EN PUERTO.-<br />

186. bcf LCD_D4 ; Cargamos un cero.-<br />

187. btfsc LCD_Dato,0 ; Si es 1, modificamos a uno, sino<br />

seguimos.-<br />

188. bsf LCD_D4<br />

189. bcf LCD_D5 ;<br />

190. btfsc LCD_Dato,1<br />

Autor: Suky Mail: inf.pic.suky@live.com.ar Web: www.micros-designs.com.ar

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!