Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Junebug LCD working

Status
Not open for further replies.
UTMonkey said:
Thanks Futz, it is a bit of a leap from 7 segment LED's but the benefits for debugging must be huge.
Not too big a leap, really. I love tinkering with 7-segs though.

I am probably being PIN greedy but is their a 1Wire(I think it's called) version?
Nope, standard 14 pins and two more for the backlight.
 
blueroomelectronics said:
Debugging with LCDs is old hat, a hardware debugger with PICs that support it are superior and require no extra coding on the users part. They do require 3 pins (MCLR, PGC & PGD)
Probably very true. I haven't done much with the MPLAB debugger. I do love using my BDM Pod for Freescale HC12's though.
 
futz said:
Dipmicro has limited inventory.

Don't worry. I will expand it as soon as we get back. The newest addition will be **broken link removed**, I am still working on their website, but few product descriptions and pricing have been published, orders can be placed directly to Polyview email, payments via PayPal. This arrangement is temporary, when I get back, I take over the online sales of Lab-Easy line. I am especially fond of the coming modular project box (not available anywhere yet) but the breadboards and proto PCBs in modular plastic holders are excellent as well.

Recently I also included entire Microchip PIC line into my inventory, everything that was DIP and was available at the moment. These were not included in my online shop but in Ebay shop only, as there was approx 150 part numbers and my online shop has a lousy and slow admin interface. I also added selected members of TIs TPIC family into my inventory. If you think some products you would like to see online, email me and I will see what I can do.

And there will be more LCDs too. But you should admit, not many retailers can beat the $6, can they ;) Lawrence has to pay the rent, he has to stand in the store whole day and pay himself a salary, while I can work on a C# contract and get the orders done in the evening. As for the Lab-Easy products, I am not allowed to go way below MSRP but I will have price-breaks starting from 2 units once I am done with Lab-Easy website.
 
Last edited:
dipmicro said:
The newest addition will be **broken link removed**... I am especially fond of the coming modular project box (not available anywhere yet) but the breadboards and proto PCBs in modular plastic holders are excellent as well.
Some super close ups and detailed info on Lab-Easy boards would be interesting. I'm still not totally clear what's so great about them.

But you should admit, not many retailers can beat the $6, can they ;)
That's a pretty hot deal. They're nice displays.
 
futz said:
Some super close ups and detailed info on Lab-Easy boards would be interesting. I'm still not totally clear what's so great about them.

Click on the pictures to zoom. Sorry, pics of QB-xx are not as good quality and I currently do not have access to the products to take the better ones. Here is detail of QB-04, I have this one with me:

**broken link removed**

**broken link removed**

. the breadboard is a selected quality BB. I personally do not use BBs but it was explained to me that some cheap BBs do not make good contact. These BBs can be lifted on AWG22 wire and they ship with AWG24, so it's easier to pull out.

. I personally like the modularity of the plastic holder with rubber feet. I think Bill is even buying these to make new version of Inchworm in that format.

. the 1mm FR4 proto boards can be cut with the office scissors. In general Polyview is here to minimize the tooling and mechanical work for the prototyping.

. the proto boards have larger holes so they do not get damaged when the leads are unsoldered and pulled out.

. double sided proto boards (most comparable proto boards are single sided)

. price - did you check the other proto boards? But do not compare with cheap cardboard ones which tend to loose pads after first soldering.

. prototyping of your circuit on the BB through proto PCB and then soldering the parts onto PCB once your circuit is working. Then you just pull the PCB out.

There is more arguments and I will update the descriptions. There is going to be an entire series of supporting products, like DB9 and other connectors with adapter that can fit onto BB (and proto PCB), plastic boxes that can mount exactly these proto boards for the price of comparable Hammond box, where you cannot even mount the PCB etc.

Polyview even developed their own thinner lead header, because standard headers are hard to use with BBs. These headers will be used with all the PCB adapters.
 
Last edited:
Here's a picture of my JuneBug in a Lab-Easy box -- a very nice product.
 

Attachments

  • DCP_5802.JPG
    DCP_5802.JPG
    174.7 KB · Views: 158
Nice photo Kyle, I just "discovered" (old news to anyone familiar with the PICkit2) that when you want to bulk program target PICs you can set the PICkit2 SE software to program when you press the button on the programmer. Handy with a ZIF target.

Now here's something gone from version 2.4 (it's in 1.1 which you can use and simply downgrade the firmware when you need it) 1.1 could recalibrate 12F629 and 12F675 PICs OSCCAL value.
 
jfcayron said:
I do! Can I download it from somewhere? :D
I'm pretty sure I fine tuned this code some in later versions, but this is my original Junebug LCD test code. The later versions do more stuff and aren't quite so simple.
Code:
	list	p=18F1320
	include	<p18F1320.inc>
	CONFIG	OSC=INTIO2,WDT=OFF,MCLRE=ON,LVP=OFF

	cblock	0x00
		d1,d2,d3,count,count2,dataout,temp,dec1,dec2
	endc

	org	0x0000
init	bsf	OSCCON,IRCF2	;set to 8MHz clock
	bsf	OSCCON,IRCF1
	bsf	OSCCON,IRCF0
	clrf	TRISA
	clrf	TRISB
	clrf	LATA
	clrf	LATB
	setf	ADCON1		;make PORTA all digital
	clrf	count
	call	dl_40ms		;allow lcd to settle before init
	call	lcdinit		;initialize lcd
	goto	main

table1	db	"Junebug LCD Demo",0x00

main	movlw	HIGH table1	;display table1
	movwf	TBLPTRH
	movlw	LOW table1
	movwf	TBLPTRL
mnloop	tblrd	*+
	movf	TABLAT,W
	xorlw	0x00		;zero?
	btfsc	STATUS,Z
	goto	next		;yes, done
	movwf	dataout		;no, go again
	call	lcdchar
	call	dl_50us		;wait 50us
	goto	mnloop
next	call	lcd_line2
	call	dl_50us

nbs	movlw	d'100'		;count down from 100 on second line
	movwf	count2
nubs	decfsz	count2
	goto	numbs
	goto	dood
numbs	movf	count2,W
	call	fix
	movf	dec1,W
	movwf	dataout
	call	lcdchar
	call	dl_50us		
	movf	dec2,w
	movwf	dataout
	call	lcdchar
	call	Delay
	call	lcd_line2
	goto	nubs
dood	goto	nbs

;************************************************************* 
; fix - subroutine takes byte passed in W - splits it into two
; ascii bytes in dec1 and dec2, representing decimal digits. 
fix:	movwf	dec2		;put number in dec2
	clrf	count		;count = 0 
	movlw	0x0a		;W = 10
tens:	subwf	dec2,F		;subtract 10 from number
	btfsc	STATUS,C	;result <10?
	goto	again		;no, go again 
	movf	count,W		;yes, put count in W 
	addlw	0x30		;add $30 to make it an ASCII number 
	movwf	dec1		;and store it in dec1 
	movf	dec2,W		;get remainder (2nd digit)
	addlw	0x0a		;put the last subtract back 
	addlw	0x30		;add $30 to make it ASCII 
	movwf	dec2		;store it back in dec2 
	return			;and return
again:	incf	count,F		;increment count 
	goto	tens		;go again 

lcd_line1
	movlw	0x80
	movwf	dataout
	call	lcdcmd
	call	dl_50us
	return

lcd_line2
	movlw	0xc0
	movwf	dataout
	call	lcdcmd
	call	dl_50us
	return

lcdinit	movlw	0x06		;send 03 nybble
	movwf	PORTA
	call	e_togg
	call	dl_05ms		;wait 5ms

	movlw	0x06		;send 3 second time
	movwf	PORTA
	call	e_togg
	call	dl_160us	;wait 160us

	movlw	0x06		;send 3 third time
	movwf	PORTA
	call	e_togg
	call	dl_160us	;wait 160us

	movlw	0x04		;enable 4-bit mode
	movwf	PORTA
	call	e_togg
	call	dl_50us		;wait 50us
		
	movlw	0x28		;set 4-bit mode and 2-lines
	movwf	dataout
	call	lcdcmd
	call	dl_50us		;wait 50us

	movlw	0x10		;cursor move & shift left
	movwf	dataout
	call	lcdcmd
	call	dl_50us		;wait 50us

	movlw	0x06		;entry mode = increment
	movwf	dataout
	call	lcdcmd
	call	dl_50us		;wait 50us

	movlw	0x0d		;display on, cursor on, blink on
	movwf	dataout
	call	lcdcmd
	call	dl_50us		;wait 50us

	movlw	0x01		;clear display
	movwf	dataout
	call	lcdcmd
	call	dl_05ms		;wait 5ms
	return

lcdcmd	swapf	dataout,W	;swap nybbles and transfer to w
	andlw	0x0f		;mask out high nybble
	movwf	temp		;rotate left one bit for A1-A4
	rlncf	temp,F
	movff	temp,LATA	;stuff result in PORTA
	bcf	LATB,1		;set RS low
	call	e_togg		;latch the data
	movf	dataout,W	;get byte in w again
	andlw	0x0f		;and mask out high nybble
	movwf	temp
	rlncf	temp,F
	movff	temp,PORTA
	bcf	LATB,1		;set RS low
	call	e_togg		;latch the data
	goto	bleh		;3 cycles - 600ns delay
bleh	nop
	nop
	return

lcdchar	swapf	dataout,W	;swap nybbles and transfer to w
	andlw	0x0f		;mask out high nybble
	movwf	temp		;rotate left one bit for A1-A4
	rlncf	temp,F
	movff	temp,LATA	;stuff result in PORTA
	bsf	LATB,1		;set RS high
	call	e_togg		;latch the data
	movf	dataout,w	;get byte in w again
	andlw	0x0f		;and mask out high nybble
	movwf	temp
	rlncf	temp,F
	movff	temp,LATA
	bsf	LATB,1		;RS high
	call	e_togg		;latch the data
	goto	bleh2		;3 cycles - 600ns delay
bleh2	nop
	nop
	return

e_togg	bsf	LATB,4		;toggle E to latch data
	nop			;delay 450ns minimum
	nop
	nop
	bcf	LATB,4
	return

dl_40ms	movlw	0x7e		;40ms delay
	movwf	d1
	movlw	0x3f
	movwf	d2
dl40_0	decfsz	d1,F
	goto	$+6
	decfsz	d2,F
	goto	dl40_0
	nop
	return

dl_05ms	movlw	0xce		;5ms delay
	movwf	d1
	movlw	0x08
	movwf	d2
dl05_0	decfsz	d1,F
	goto	$+6
	decfsz	d2,F
	goto	dl05_0
	return

dl_160us			;160us delay
	movlw	0x69
	movwf	d1
dl160_0	decfsz	d1,F
	goto	dl160_0
	return

dl_50us	movlw	0x1f		;50us delay
	movwf	d1
dl50_0	decfsz	d1,F
	goto	dl50_0
	return

Delay	movlw	0x0c		;.75 second delay
	movwf	d1
	movlw	0x46
	movwf	d2
	movlw	0x04
	movwf	d3
Delay_0	decfsz	d1,F
	goto	$+6
	decfsz	d2,F
	goto	$+6
	decfsz	d3,F
	goto	Delay_0
	return

	end
 
futz said:
I'm pretty sure I fine tuned this code some in later versions, but this is my original Junebug LCD test code. The later versions do more stuff and aren't quite so simple.

This is great. I just needed a proof of concept, and it worked the first time around.
Many thanks.

On a sidenote, my device has a pair of connections marked LED+ and LED-
I assume it is the backlight, but it does not work through a 100:eek:hm: resistor nor directly at 5V. Just wondering what it requires.
Any idea?

Thanks again.
 
jfcayron said:
This is great. I just needed a proof of concept, and it worked the first time around.
Many thanks.
Great! Glad it helped. :D

On a sidenote, my device has a pair of connections marked LED+ and LED-
I assume it is the backlight, but it does not work through a 100:eek:hm: resistor nor directly at 5V. Just wondering what it requires.
Any idea?
Pins 15/16? That's the backlight. Try to look up a datasheet for your display. That will give you the details. If it's an LED some displays have current limit resistor built in. I assume some don't - mine do so I just feed em 5V and ground and they work fine.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top